- do not run createrepo on --no-init
authorAdrian Schröter <adrian@suse.de>
Tue, 12 Jun 2012 13:24:15 +0000 (15:24 +0200)
committerAdrian Schröter <adrian@suse.de>
Tue, 12 Jun 2012 13:24:15 +0000 (15:24 +0200)
- revert /usr/sbin/kiwi call, kiwi requires also sbin in $PATH (fixed in qemu-accel instead)

build_kiwi.sh

index 5cdd2ee..87065c4 100644 (file)
@@ -20,7 +20,7 @@ run_kiwi()
        ln -s $rl$r "${rc%/*}/${rc##*/}"
        repo="$TOPDIR/SOURCES/repos/${rc%/*}/${rc##*/}/"
         fi
-        if test "$imagetype" != product ; then
+        if test "$imagetype" != product -a "$DO_INIT" != "false" ; then
            echo "creating repodata for $repo"
            if chroot $BUILD_ROOT createrepo --simple-md-filenames --help >/dev/null 2>&1 ; then
                chroot $BUILD_ROOT createrepo --simple-md-filenames "$repo"
@@ -114,10 +114,10 @@ run_kiwi()
        for imgtype in $imagetype ; do
            echo "running kiwi --prepare for $imgtype..."
            # Do not use $BUILD_USER here, since we always need root permissions
-           if chroot $BUILD_ROOT su -c "cd $TOPDIR/SOURCES && /usr/sbin/kiwi --prepare $TOPDIR/SOURCES --logfile terminal --root $TOPDIR/KIWIROOT-$imgtype" - root < /dev/null ; then
+           if chroot $BUILD_ROOT su -c "cd $TOPDIR/SOURCES && kiwi --prepare $TOPDIR/SOURCES --logfile terminal --root $TOPDIR/KIWIROOT-$imgtype" - root < /dev/null ; then
                echo "running kiwi --create for $imgtype..."
                mkdir -p $BUILD_ROOT/$TOPDIR/KIWI-$imgtype
-               chroot $BUILD_ROOT su -c "cd $TOPDIR/SOURCES && /usr/sbin/kiwi --create $TOPDIR/KIWIROOT-$imgtype --logfile terminal --type $imgtype -d $TOPDIR/KIWI-$imgtype" - root < /dev/null || cleanup_and_exit 1
+               chroot $BUILD_ROOT su -c "cd $TOPDIR/SOURCES && kiwi --create $TOPDIR/KIWIROOT-$imgtype --logfile terminal --type $imgtype -d $TOPDIR/KIWI-$imgtype" - root < /dev/null || cleanup_and_exit 1
            else
                cleanup_and_exit 1
            fi