[Fedora-livecd-list] creator/livecd-creator

Jeremy Katz katzj at fedoraproject.org
Wed Oct 24 01:02:03 UTC 2007


 creator/livecd-creator |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 14c621362a23f1d8080f535c9cdcdb3c10287602
Author: Chris Lalancette <clalance at redhat.com>
Date:   Tue Oct 23 17:45:02 2007 -0400

    Fix --base-on
    
    I'm working with the latest version of livecd-creator available in rawhide,
    which is livecd-tools-012-1.fc8.  I noticed a bug when using the --base-on
    option; basically, it is testing for the existence of the squashfs.img, but that
    path can't possibly exist until the ISO has been loopback mounted.  The attached
    patch moves the mounting of the ISO before the check to see if the squashfs
    filesystem exists.  With this patch, I am able to successfully use the --base-on
    option.
    
    Signed-off-by: Chris Lalancette <clalance at redhat.com>

diff --git a/creator/livecd-creator b/creator/livecd-creator
index 8314cfe..b0a2cf4 100755
--- a/creator/livecd-creator
+++ b/creator/livecd-creator
@@ -418,6 +418,11 @@ class ImageCreator(object):
 
         isoloop = LoopbackMount(base_on, "%s/base_on_iso" %(self.build_dir,))
 
+        try:
+            isoloop.mount()
+        except MountError, e:
+            raise InstallationError("Failed to loopback mount '%s' : %s" % (base_on, e))
+
         # legacy LiveOS filesystem layout support, remove for F9 or F10
         if os.path.exists("%s/LiveOS/squashfs.img" %(isoloop.mountdir,)):
             squashloop = LoopbackMount("%s/LiveOS/squashfs.img" %(isoloop.mountdir,),
@@ -429,11 +434,6 @@ class ImageCreator(object):
                                        "squashfs")
 
         try:
-            try:
-                isoloop.mount()
-            except MountError, e:
-                raise InstallationError("Failed to loopback mount '%s' : %s" % (base_on, e))
-
             if not os.path.exists(squashloop.lofile):
                 raise InstallationError("'%s' is not a valid live CD ISO : squashfs.img doesn't exist" % base_on)
 





More information about the livecd mailing list