From c5bdb5b7e8f655cf93e96640aa8da1c5b964e391 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Thu, 26 Jun 2008 14:00:46 +0000 Subject: [PATCH] automatically extract rpms from vm swap file --- build | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build b/build index ca7e6a9..01b32d1 100755 --- a/build +++ b/build @@ -798,6 +798,8 @@ echo test "$BUILD_ARCH" = all && BUILD_ARCH= +rm -rf $BUILD_ROOT/.build.packages + for SPECFILE in "${SPECFILES[@]}" ; do SRCDIR="${SPECFILE%/*}" @@ -963,7 +965,13 @@ for SPECFILE in "${SPECFILES[@]}" ; do if test -n "$XENSWAP" ; then BUILDSTATUS=`dd if="$XENSWAP" bs=12 count=1 2>/dev/null` case $BUILDSTATUS in - BUILDSTATUS[0-9]) + BUILDSTATUS0) + mkdir -p $BUILD_ROOT/.build.packages + cd $BUILD_ROOT/.build.packages || cleanup_and_exit 1 + dd if=$XENSWAP bs=512 skip=1 | cpio --extract --no-absolute-filenames -v + cleanup_and_exit 0 + ;; + BUILDSTATUS[1-9]) cleanup_and_exit ${BUILDSTATUS#BUILDSTATUS} ;; esac -- 2.7.4