[Fedora-livecd-list] imgcreate/live.py

Jeremy Katz katzj at fedoraproject.org
Tue Mar 3 01:39:46 UTC 2009


 imgcreate/live.py |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 1ab1603c70b8e5ca0c54e701618208fc66278f40
Author: Jeremy Katz <katzj at redhat.com>
Date:   Mon Mar 2 20:39:36 2009 -0500

    Support syslinux having moved to /usr/share

diff --git a/imgcreate/live.py b/imgcreate/live.py
index c75cc92..7b07d22 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -308,12 +308,13 @@ class x86LiveImageCreator(LiveImageCreatorBase):
         return ""
 
     def __find_syslinux_menu(self):
-        for menu in ["vesamenu.c32", "menu.c32"]:
-            if os.path.isfile(self._instroot + "/usr/lib/syslinux/" + menu):
-                return menu
+        for menu in ("vesamenu.c32", "menu.c32"):
+            for dir in ("/usr/lib/syslinux/", "/usr/share/syslinux/"):
+                if os.path.isfile(self._instroot + dir + menu):
+                    return menu
 
         raise CreatorError("syslinux not installed : "
-                           "no suitable /usr/lib/syslinux/*menu.c32 found")
+                           "no suitable *menu.c32 found")
 
     def __find_syslinux_mboot(self):
         #
@@ -330,8 +331,10 @@ class x86LiveImageCreator(LiveImageCreatorBase):
             files += [mboot]
 
         for f in files:
-            path = self._instroot + "/usr/lib/syslinux/" + f
-
+            if os.path.exists(self._instroot + "/usr/lib/syslinux/" + f):
+                path = self._instroot + "/usr/lib/syslinux/" + f
+            elif os.path.exists(self._instroot + "/usr/share/syslinux/" + f):
+                path = self._instroot + "/usr/share/syslinux/" + f
             if not os.path.isfile(path):
                 raise CreatorError("syslinux not installed : "
                                    "%s not found" % path)





More information about the Fedora-livecd-list mailing list