Parse not query the RNAME
[git-tools-moved-to-github.git] / id-deb-build / id-pbuild.sh
index 0f3441e..76559c0 100755 (executable)
@@ -79,7 +79,7 @@ if test ! -x $PBUILDROOT; then
 fi
 
 if test "$CENTOS_DIST"; then
-    RNAME=`rpm -q --specfile *.spec --queryformat "%{NAME};" | cut -d ";" -f1`
+    RNAME=`awk '/Name:/ {print $2}' *.spec`
     echo "RNAME=$RNAME"
     if test "$NAME" -a "$NAME" != "$RNAME"; then
        echo "NAME in IDMETA ($NAME) does not match RPM spec NAME ($RNAME)"