change order to use "keeping" of installed packages also for deb's
authorAdrian Schröter <adrian@suse.de>
Mon, 9 Nov 2009 18:16:13 +0000 (18:16 +0000)
committerAdrian Schröter <adrian@suse.de>
Mon, 9 Nov 2009 18:16:13 +0000 (18:16 +0000)
init_buildsystem

index b6cffee..b8818f4 100755 (executable)
@@ -600,6 +600,17 @@ for PKG in $PACKAGES_TO_INSTALL_FIRST RUN_LDCONFIG $PACKAGES_TO_INSTALL ; do
 
     test -f $BUILD_ROOT/installed-pkg/$PKG && continue
 
+    test -L $BUILD_ROOT/.init_b_cache/rpms/$PKG.rpm || continue
+    if test -f $BUILD_ROOT/.init_b_cache/rpms/$PKG.id -a -f $BUILD_ROOT/.init_b_cache/alreadyinstalled/$PKG ; then
+        read PKGID < $BUILD_ROOT/.init_b_cache/rpms/$PKG.id
+       read OLDPKGID < $BUILD_ROOT/.init_b_cache/alreadyinstalled/$PKG
+       if test "$PKGID" = "$OLDPKGID" ; then
+           echo "keeping ${PKGID%% *}"
+           echo "$PKGID" > $BUILD_ROOT/installed-pkg/$PKG
+           continue
+       fi
+    fi
+
     if test $PSUF = deb ; then
        # debian world, install deb files
        test -L $BUILD_ROOT/.init_b_cache/rpms/$PKG.deb || continue
@@ -618,18 +629,6 @@ for PKG in $PACKAGES_TO_INSTALL_FIRST RUN_LDCONFIG $PACKAGES_TO_INSTALL ; do
        continue
     fi
 
-    test -L $BUILD_ROOT/.init_b_cache/rpms/$PKG.rpm || continue
-
-    if test -f $BUILD_ROOT/.init_b_cache/rpms/$PKG.id -a -f $BUILD_ROOT/.init_b_cache/alreadyinstalled/$PKG ; then
-        read PKGID < $BUILD_ROOT/.init_b_cache/rpms/$PKG.id
-       read OLDPKGID < $BUILD_ROOT/.init_b_cache/alreadyinstalled/$PKG
-       if test "$PKGID" = "$OLDPKGID" ; then
-           echo "keeping ${PKGID%% *}"
-           echo "$PKGID" > $BUILD_ROOT/installed-pkg/$PKG
-           continue
-       fi
-    fi
-
     PKGID=`rpm -qp --qf "$RPMIDFMT" $RPMCHECKOPTS_HOST $BUILD_ROOT/.init_b_cache/rpms/$PKG.rpm`
 
     if test -f $BUILD_ROOT/.init_b_cache/alreadyinstalled/$PKG ; then
@@ -659,6 +658,7 @@ for PKG in $PACKAGES_TO_INSTALL_FIRST RUN_LDCONFIG $PACKAGES_TO_INSTALL ; do
            test rpm = "$PKG" && chroot $BUILD_ROOT rpm --rebuilddb
        fi
     fi
+
     export ADDITIONAL_PARAMS=
     if test "$USE_FORCE" = true ; then
         export ADDITIONAL_PARAMS="$ADDITIONAL_PARAMS --force"