From: Ludwig Nussel Date: Thu, 26 Jun 2008 14:00:46 +0000 (+0000) Subject: automatically extract rpms from vm swap file X-Git-Tag: obs_2.0~360 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5bdb5b7e8f655cf93e96640aa8da1c5b964e391;p=platform%2Fupstream%2Fbuild.git automatically extract rpms from vm swap file --- 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