- reorder only when needed
authorAdrian Schröter <adrian@suse.de>
Wed, 30 May 2012 12:09:16 +0000 (14:09 +0200)
committerAdrian Schröter <adrian@suse.de>
Wed, 30 May 2012 12:09:16 +0000 (14:09 +0200)
init_buildsystem

index 92cd1a9..1eca42b 100755 (executable)
@@ -768,12 +768,14 @@ if test ! -f $BUILD_ROOT/var/lib/rpm/packages.rpm -a ! -f $BUILD_ROOT/var/lib/rp
     for PKG in $PACKAGES_TO_RUNSCRIPTS ; do
        : > $BUILD_ROOT/.init_b_cache/scripts/$PKG.run
     done
+    PACKAGES_TO_PREINSTALL=`reorder $PACKAGES_TO_PREINSTALL`
     progress_setup PACKAGES_TO_PREINSTALL
     for PKG in $PACKAGES_TO_PREINSTALL ; do
        progress_step PACKAGES_TO_PREINSTALL
        preinstall ${PKG##*/}
     done
     if test -n "$PREPARE_VM" ; then
+        PACKAGES_TO_VMINSTALL=`reorder $PACKAGES_TO_VMINSTALL`
        progress_setup PACKAGES_TO_VMINSTALL
        for PKG in $PACKAGES_TO_VMINSTALL ; do
            progress_step PACKAGES_TO_VMINSTALL
@@ -781,6 +783,7 @@ if test ! -f $BUILD_ROOT/var/lib/rpm/packages.rpm -a ! -f $BUILD_ROOT/var/lib/rp
        done
     fi
     # add cbpreinstall if cross HOST != TARGET
+    PACKAGES_TO_CBINSTALL=`reorder $PACKAGES_TO_CBINSTALL`
     progress_setup PACKAGES_TO_CBPREINSTALL
     for PKG in $PACKAGES_TO_CBPREINSTALL ; do
        progress_step PACKAGES_TO_CBPREINSTALL
@@ -810,9 +813,6 @@ if test -n "$PREPARE_VM" ; then
     # that...
     echo -n 'reordering...'
     PACKAGES_TO_INSTALL=`reorder $PACKAGES_TO_INSTALL`
-    PACKAGES_TO_PREINSTALL=`reorder $PACKAGES_TO_PREINSTALL`
-    PACKAGES_TO_VMINSTALL=`reorder $PACKAGES_TO_VMINSTALL`
-    PACKAGES_TO_CBINSTALL=`reorder $PACKAGES_TO_CBINSTALL`
     echo 'done'
     Q="'\''"
     echo "PACKAGES_TO_INSTALL='${PACKAGES_TO_INSTALL//"'"/$Q}'" > $BUILD_ROOT/.build/init_buildsystem.data