summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinit_buildsystem9
1 files changed, 7 insertions, 2 deletions
diff --git a/init_buildsystem b/init_buildsystem
index 9d3fd80..2ed0473 100755
--- a/init_buildsystem
+++ b/init_buildsystem
@@ -978,8 +978,13 @@ for PKG in $MAIN_LIST ; do
continue
fi
fi
-
- PKGID=$(perl -I$BUILD_DIR -MBuild -e Build::showquery "$BUILD_ROOT/.init_b_cache/rpms/$PKG.$PSUF" buildid)
+
+ # revert use rpm to query pkgid if building rpm package
+ if test "$PSUF" != "rpm" ; then
+ PKGID=$(perl -I$BUILD_DIR -MBuild -e Build::showquery "$BUILD_ROOT/.init_b_cache/rpms/$PKG.$PSUF" buildid)
+ else
+ PKGID=`rpm -qp --qf "$RPMIDFMT" $RPMCHECKOPTS_HOST $BUILD_ROOT/.init_b_cache/rpms/$PKG.rpm`
+ fi
if test -f $BUILD_ROOT/.init_b_cache/alreadyinstalled/$PKG ; then
read OLDPKGID < $BUILD_ROOT/.init_b_cache/alreadyinstalled/$PKG