diff options
author | Jiankang Fan <jiankang.fan@samsung.com> | 2017-02-11 15:03:51 +0900 |
---|---|---|
committer | SoonKyu Park <sk7.park@samsung.com> | 2017-02-20 19:41:35 +0900 |
commit | c78c8c0d3029b2c4e8dd761924cdf0dcb9615afe (patch) | |
tree | 8e2d7933374ae915210fdb9815a3e589ec621b6e | |
parent | e4ca62e2be22f2d04e819d39dfb66e6e15700fdd (diff) | |
download | build-c78c8c0d3029b2c4e8dd761924cdf0dcb9615afe.tar.gz build-c78c8c0d3029b2c4e8dd761924cdf0dcb9615afe.tar.bz2 build-c78c8c0d3029b2c4e8dd761924cdf0dcb9615afe.zip |
revert to old version, use rpm command to query pkgid
Because rpm command faster than perl query
Change-Id: Ib4dabfb78253779bbdc47aa27d5be085dca2ed4a
Signed-off-by: Jiankang Fan <jiankang.fan@samsung.com>
-rwxr-xr-x | init_buildsystem | 9 |
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 |