Skip to content

Commit

Permalink
- support new kiwi bundler, handing over the bundling
Browse files Browse the repository at this point in the history
to kiwi itself
  • Loading branch information
adrianschroeter committed Jun 4, 2014
1 parent 25adffc commit 6188833
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions build-recipe-kiwi
Expand Up @@ -318,16 +318,32 @@ build_kiwi_appliance() {
echo "starting device mapper for kiwi..."
test -x /etc/init.d/boot.device-mapper && /etc/init.d/boot.device-mapper start
fi
RUN_BUNDLE="true"
for imgtype in $imagetype ; do
echo "running kiwi --prepare for $imgtype..."
# Do not use $BUILD_USER here, since we always need root permissions
chroot $BUILD_ROOT su -c "cd $TOPDIR/SOURCES && kiwi --prepare $TOPDIR/SOURCES --logfile terminal --root $TOPDIR/KIWIROOT-$imgtype $KIWI_PARAMETERS" - root < /dev/null || cleanup_and_exit 1
echo "running kiwi --create for $imgtype..."
mkdir -p $BUILD_ROOT/$TOPDIR/KIWI-$imgtype
chroot $BUILD_ROOT su -c "cd $TOPDIR/SOURCES && kiwi --create $TOPDIR/KIWIROOT-$imgtype --logfile terminal --type $imgtype -d $TOPDIR/KIWI-$imgtype $KIWI_PARAMETERS" - root < /dev/null || cleanup_and_exit 1
rm -rf "/$TOPDIR/KIWI.bundle"
if chroot $BUILD_ROOT su -c "kiwi --bundle-build $TOPDIR/KIWI-$imgtype -d /$TOPDIR/KIWI.bundle/ --bundle-id Build$RELEASE" - root < /dev/null; then
mv "/$TOPDIR/KIWI.bundle/*" "/$TOPDIR/KIWI/"
rmdir "/$TOPDIR/KIWI.bundle"
unset RUN_BUNDLE
fi
done
BUILD_SUCCEEDED=true

if test -z "$RUN_BUNDLE"; then
# new kiwi has bundled our result already :)
return
fi

#
# Legacy bundling code for kiwi version below 5.06.106
#

# create tar.gz of images, in case it makes sense
buildnum=
if test -n "$RELEASE"; then
Expand Down
2 changes: 1 addition & 1 deletion build-vm
Expand Up @@ -743,7 +743,7 @@ vm_first_stage() {
cleanup_and_exit ${BUILDSTATUS#BUILDSTATUS}
;;
*)
echo "No buildstatus set, either the base system is broken (glibc/bash/perl)"
echo "No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl)"
echo "or the build host has a kernel or hardware problem..."
cleanup_and_exit 3
;;
Expand Down

0 comments on commit 6188833

Please sign in to comment.