diff options
Diffstat (limited to 'init_buildsystem')
-rwxr-xr-x | init_buildsystem | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/init_buildsystem b/init_buildsystem index ff0bddd..c7dc95a 100755 --- a/init_buildsystem +++ b/init_buildsystem @@ -35,6 +35,7 @@ RPMIDFMT="%{NAME}-%{VERSION}-%{RELEASE} %{BUILDTIME}\n" PREPARE_VM= USE_SYSTEM_QEMU= +KEEP_PACKS= USEUSEDFORBUILD= LIST_STATE= RPMLIST= @@ -51,6 +52,10 @@ while test -n "$1" ; do shift USE_SYSTEM_QEMU=true ;; + --keep-packs) + shift + KEEP_PACKS=true + ;; --create-build-binaries) shift CREATE_BUILD_BINARIES=true @@ -906,23 +911,25 @@ rpm_e() # # delete all packages we don't want # -mkdir -p $BUILD_ROOT/.init_b_cache/todelete -for PKG in $BUILD_ROOT/.init_b_cache/alreadyinstalled/* ; do - PKG=${PKG##*/} - test "$PKG" = "*" && continue - ln $BUILD_ROOT/.init_b_cache/alreadyinstalled/$PKG $BUILD_ROOT/.init_b_cache/todelete/$PKG -done -for PKG in $PACKAGES_TO_INSTALL; do - rm -f $BUILD_ROOT/.init_b_cache/todelete/$PKG -done -for PKG in $BUILD_ROOT/.init_b_cache/todelete/* ; do - PKG=${PKG##*/} - test "$PKG" = "*" && continue - echo "deleting $PKG" - rpm_e "$PKG" - check_exit -done -rm -rf "$BUILD_ROOT/.init_b_cache/todelete" +if [ -z "$KEEP_PACKS" ]; then + mkdir -p $BUILD_ROOT/.init_b_cache/todelete + for PKG in $BUILD_ROOT/.init_b_cache/alreadyinstalled/* ; do + PKG=${PKG##*/} + test "$PKG" = "*" && continue + ln $BUILD_ROOT/.init_b_cache/alreadyinstalled/$PKG $BUILD_ROOT/.init_b_cache/todelete/$PKG + done + for PKG in $PACKAGES_TO_INSTALL; do + rm -f $BUILD_ROOT/.init_b_cache/todelete/$PKG + done + for PKG in $BUILD_ROOT/.init_b_cache/todelete/* ; do + PKG=${PKG##*/} + test "$PKG" = "*" && continue + echo "deleting $PKG" + rpm_e "$PKG" + check_exit + done + rm -rf "$BUILD_ROOT/.init_b_cache/todelete" +fi rm -rf "$BUILD_ROOT/.init_b_cache/preinstalls" mkdir -p "$BUILD_ROOT/.init_b_cache/preinstalls" |