Hi,

When the installation root or mount point is attempted to be created, and already exists, livecd-tools will show a traceback and fail to continue. I'm thinking that creating the directory on which to loopmount something doesn't need to show a traceback under this particular circumstance, as livecd-tools should just ensure the directory is there.

Attached is a small patch resolving this (might also test if exists and rmtree if it does and then recreate it).

Kind regards,

Jeroen van Meeuwen
-kanarip
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
index c280d66..766c228 100644
--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -422,7 +422,15 @@ class ImageCreator(object):
         """
         self.__ensure_builddir()
 
-        os.makedirs(self._instroot)
+        try:
+            os.makedirs(self._instroot)
+        except OSError, e:
+            if e.errno == 17:
+                # It doesn't really matter that this directory exists
+                pass
+            else
+                raise OSError, e
+
         os.makedirs(self._outdir)
 
         self._mount_instroot(base_on)
--
Fedora-livecd-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/fedora-livecd-list

Reply via email to