Bug#627902: ext2/ext3 case in lb_binary_rootfs fails with --build-with-chroot false
Package: live-build
Version: 3.0~a17-1
Severity: normal
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch oneiric
If you try to use '--chroot-filesystem ext3 --build-with-chroot false',
then the build fails with:
du: cannot access `chroot/chroot': No such file or directory
expr: non-integer argument
genext2fs: too few blocks. Note: options have changed, see --help or the man page.
Patch attached to make it run du on the right path.
Thanks,
--
Colin Watson [cjwatson@ubuntu.com]
>From 98aacab652dad1a7115f340e16560a3d04c3db4e Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@canonical.com>
Date: Wed, 25 May 2011 11:32:52 +0100
Subject: [PATCH] Fix ext2/ext3 case in lb_binary_rootfs to work with --build-with-chroot false.
---
scripts/build/lb_binary_rootfs | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/scripts/build/lb_binary_rootfs b/scripts/build/lb_binary_rootfs
index 2e3e34e..ce007e3 100755
--- a/scripts/build/lb_binary_rootfs
+++ b/scripts/build/lb_binary_rootfs
@@ -100,7 +100,16 @@ case "${LB_CHROOT_FILESYSTEM}" in
rm -f binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM}
fi
- DU_DIM="$(du -ks chroot/chroot | cut -f1)"
+ case "${LB_BUILD_WITH_CHROOT}" in
+ true)
+ DU_DIM="$(du -ks chroot/chroot | cut -f1)"
+ ;;
+
+ false)
+ DU_DIM="$(du -ks chroot | cut -f1)"
+ ;;
+ esac
+
REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LB_CHROOT_FILESYSTEM})"
RESERVED_PERCENTAGE="--reserved-percentage"
--
1.7.4.1
Reply to: