From: Michael Schröder Date: Wed, 14 May 2008 10:34:17 +0000 (+0000) Subject: - fix host setting X-Git-Tag: obs_2.0~391 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c474f18262a31de55311b7639856bfd9016cb60f;p=tools%2Fobs-build.git - fix host setting - use umount on build root, it's more stable --- diff --git a/build b/build index 0c5290a..3038162 100755 --- a/build +++ b/build @@ -171,7 +171,8 @@ cleanup_and_exit () { else umount -n $BUILD_ROOT/proc 2>/dev/null || true umount -n $BUILD_ROOT/dev/pts 2>/dev/null || true - [ -n "$VM_IMAGE" ] && umount "$VM_IMAGE" 2>/dev/null || true + test "$VM_IMAGE" = 1 && VM_IMAGE= + [ -n "$VM_IMAGE" ] && umount $BUILD_ROOT 2>/dev/null || true fi exit $1 } @@ -458,11 +459,10 @@ mkdir_build_root() shopt -s nullglob -if detect_xen_2nd_stage; then +if detect_xen_2nd_stage ; then set "/.build-srcdir/$SPECFILE" -else - export HOST fi +export HOST while test -n "$1"; do PARAM="$1" @@ -887,7 +887,7 @@ for SPECFILE in "${SPECFILES[@]}" ; do umount -n $BUILD_ROOT/proc 2> /dev/null || true umount -n $BUILD_ROOT/dev/pts 2> /dev/null || true umount -n $BUILD_ROOT/mnt 2> /dev/null || true - umount $VM_IMAGE + umount $BUILD_ROOT if [ -n "$USE_XEN" ]; then XMROOT=file:$VM_IMAGE