- do not copy-in host qemu anymore by default to be sure that we have a maintainable...
authorAdrian Schröter <adrian@suse.de>
Mon, 23 Apr 2012 15:28:15 +0000 (17:28 +0200)
committerAdrian Schröter <adrian@suse.de>
Mon, 23 Apr 2012 15:28:15 +0000 (17:28 +0200)
build
init_buildsystem

diff --git a/build b/build
index c0e49c3..96c2af8 100755 (executable)
--- a/build
+++ b/build
@@ -54,6 +54,7 @@ DO_INIT=true
 DO_LINT=
 DO_CHECKS=true
 CLEAN_BUILD=
+USE_SYSTEM_QEMU=
 SPECFILES=()
 SRCDIR=
 BUILD_JOBS=
@@ -872,6 +873,9 @@ while test -n "$1"; do
       *-baselibs-internal)
        CREATE_BASELIBS=internal
        ;;
+      *-use-system-qemu)
+       USE_SYSTEM_QEMU=true
+      ;;
       *-root)
        needarg
        BUILD_ROOT="$ARG"
@@ -1477,7 +1481,7 @@ for SPECFILE in "${SPECFILES[@]}" ; do
        if test "$DO_INIT" = true ; then
            # do fist stage of init_buildsystem
            rm -f $BUILD_ROOT/.build.success
-           set -- init_buildsystem --cachedir "$CACHE_DIR" --prepare "${definesnstuff[@]}" "${repos[@]}" $CLEAN_BUILD $USEUSEDFORBUILD $RPMLIST "$MYSRCDIR/$SPECFILE" $ADDITIONAL_PACKS
+           set -- init_buildsystem --cachedir "$CACHE_DIR" --prepare "${definesnstuff[@]}" "${repos[@]}" $CLEAN_BUILD $USE_SYSTEM_QEMU $USEUSEDFORBUILD $RPMLIST "$MYSRCDIR/$SPECFILE" $ADDITIONAL_PACKS
            echo "$* ..."
            "$@" || cleanup_and_exit 1
            check_exit
@@ -1754,7 +1758,7 @@ for SPECFILE in "${SPECFILES[@]}" ; do
        echo "BUILD_INCARNATION=$INCARNATION" > $BUILD_ROOT/.buildenv
        CREATE_BUILD_BINARIES=
        egrep '^#[       ]*needsbinariesforbuild[       ]*$' >/dev/null <$MYSRCDIR/$SPECFILE && CREATE_BUILD_BINARIES=--create-build-binaries
-       set -- init_buildsystem --cachedir "$CACHE_DIR" "${definesnstuff[@]}" "${repos[@]}" $CLEAN_BUILD $USEUSEDFORBUILD $CREATE_BUILD_BINARIES $RPMLIST "$MYSRCDIR/$SPECFILE" $ADDITIONAL_PACKS
+       set -- init_buildsystem --cachedir "$CACHE_DIR" "${definesnstuff[@]}" "${repos[@]}" $CLEAN_BUILD $USE_SYSTEM_QEMU $USEUSEDFORBUILD $CREATE_BUILD_BINARIES $RPMLIST "$MYSRCDIR/$SPECFILE" $ADDITIONAL_PACKS
        echo "$* ..."
        "$@" || cleanup_and_exit 1
        check_exit
index a9e901e..1834b0c 100755 (executable)
@@ -34,6 +34,7 @@ TMPFILE=$BUILD_ROOT/tmpfile
 RPMIDFMT="%{NAME}-%{VERSION}-%{RELEASE} %{BUILDTIME}\n"
 
 PREPARE_VM=
+USE_SYSTEM_QEMU=
 USEUSEDFORBUILD=
 LIST_STATE=
 RPMLIST=
@@ -46,6 +47,10 @@ while test -n "$1" ; do
            shift
            PREPARE_VM=true
            ;;
+       --use-system-qemu)
+           shift
+           USE_SYSTEM_QEMU=true
+           ;;
        --create-build-binaries)
            shift
            CREATE_BUILD_BINARIES=true
@@ -627,7 +632,7 @@ else
     # copy the QEMU emulator
     #
     if check_use_emulator; then
-       copy_qemu
+       [ -n "$USE_SYSTEM_QEMU" ] && copy_qemu
        if [ -z "$PREPARE_VM" ]; then
            if ! check_binfmt_registered; then
                echo "registering binfmt handlers"