prepare qemu only outside vm
authorLudwig Nussel <ludwig.nussel@suse.de>
Wed, 31 Mar 2010 14:39:31 +0000 (16:39 +0200)
committerLudwig Nussel <ludwig.nussel@suse.de>
Wed, 31 Mar 2010 14:39:31 +0000 (16:39 +0200)
init_buildsystem

index 3d20fba..35b4385 100755 (executable)
@@ -310,8 +310,6 @@ function validate_cache_file {
 #
 copy_qemu()
 {
-    check_use_emulator || return
-
     echo "copying qemu"
     mkdir -p  $BUILD_ROOT/usr/bin $BUILD_ROOT/usr/sbin
     install -m755 /usr/bin/qemu-* $BUILD_ROOT/usr/bin
@@ -322,11 +320,6 @@ copy_qemu()
     mkdir -p  $BUILD_ROOT/bin
     install -m755 /bin/bash-static $BUILD_ROOT/bin
     install -m755 /bin/mount-static $BUILD_ROOT/bin
-    # XXX: not needed if vm is used
-    if ! check_binfmt_registered; then
-       echo "registering binfmt handlers"
-       /usr/sbin/qemu-binfmt-conf.sh
-    fi
 }
 
 check_binfmt_registered()
@@ -410,12 +403,6 @@ if test -e $BUILD_IS_RUNNING ; then
 fi
 
 #
-# register the QEMU emulator
-# reset mmap_min_addr for QEMU
-#
-copy_qemu
-
-#
 # store that we start to build system
 #
 mkdir -p $BUILD_ROOT
@@ -472,6 +459,19 @@ else
        cleanup_and_exit 0
     fi
 
+    #
+    # copy the QEMU emulator
+    #
+    if check_use_emulator; then
+       copy_qemu
+       if [ -z "$PREPARE_VM" ]; then
+           if ! check_binfmt_registered; then
+               echo "registering binfmt handlers"
+               /usr/sbin/qemu-binfmt-conf.sh
+           fi
+       fi
+    fi
+
     PACKAGES_TO_INSTALL=
     PACKAGES_TO_PREINSTALL=
     PACKAGES_TO_RUNSCRIPTS=