From fc9058007ea5214d9124bd23573b2275c8f94c10 Mon Sep 17 00:00:00 2001
From: Oliver Grawert <ogra@ubuntu.com>
Date: Thu, 22 Jul 2010 18:29:53 +0200
Subject: [PATCH] Import patches-unapplied version 1.141 to ubuntu/maverick

Imported using git-ubuntu import.

Changelog parent: fd7f799638022c9de8a7401aeec9b2d239fd730f

New changelog entries:
  * add some debug output to teh ext2 image creation to see whats going on
---
 debian/changelog | 6 ++++++
 livecd.sh        | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index c5b0895f..49611d00 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+livecd-rootfs (1.141) maverick; urgency=low
+
+  * add some debug output to teh ext2 image creation to see whats going on
+
+ -- Oliver Grawert <ogra@ubuntu.com>  Thu, 22 Jul 2010 18:29:53 +0200
+
 livecd-rootfs (1.140) maverick; urgency=low
 
   * tell mke2fs that we _really_ want a filesystem on this "non-blockdevice"
diff --git a/livecd.sh b/livecd.sh
index 098b39aa..3d8a61a8 100755
--- a/livecd.sh
+++ b/livecd.sh
@@ -78,6 +78,8 @@ livefs_ext2()
 {
   # Add 10MiB extra free space for first boot + ext3 journal
   size=$(($(du -ks ${ROOT} | cut -f1) + (10240)))
+  # DEBUG: get the detected size in the log
+  echo "size variable set to: ${size}"
   MOUNTPOINT=$(mktemp -d)
   DEV=$(losetup -f)
   echo "Building ext2 filesystem."
@@ -88,8 +90,12 @@ livefs_ext2()
   # create an empty ext2 image and loop mount it
   dd if=/dev/zero of=livecd.${FSS}.ext2 bs=1024 count=0 seek=$size
   mke2fs -F livecd.${FSS}.ext2
+  # DEBUG: see if the image size matches the detected size value
+  ls -l livecd.${FSS}.ext2
   mount -o loop=${DEV} livecd.${FSS}.ext2 ${MOUNTPOINT}
 
+  # DEBUG: see if the imounted image free space matches
+  df
   # copy chroot content to image
   cp -a ${ROOT} ${MOUNTPOINT}