Firstly, check_options fails to take into consideration that a user might
have set isolinux_cfg in their config file and did not specify --isolinux-cfg
on the command line.
Secondly, when specifying isolinux_cfg, it copies the file to the isolinux
directory without renaming it to isolinux.cfg. This is useless. It needs
to be renamed to isolinux.cfg when it's copied.
Cheers...Paul...
--- revisor-2.1.3.orig/revisor/modisolinux/__init__.py 2008-12-01 10:20:54.000000000 -0600
+++ revisor-2.1.3/revisor/modisolinux/__init__.py 2008-12-22 16:52:43.828197000 -0600
@@ -53,14 +53,17 @@
self.cfg = cfg
self.log = cfg.log
if not cli_options.isolinux_cfg == "":
- if self.cfg.kickstart_default:
- self.log.warning(_("Both --kickstart-default and --isolinux-cfg have been specified, while they are mutually exclusive. --isolinux-cfg is going to be used."))
- self.cfg.kickstart_default = False
# FIXME: Test if the file is readable
self.cfg.isolinux_cfg = cli_options.isolinux_cfg
else:
- self.cfg.isolinux_cfg = False
+ if self.cfg.isolinux_cfg == "":
+ self.cfg.isolinux_cfg = False
+
+ if not self.cfg.isolinux_cfg == False and not self.cfg.isolinux_cfg == "":
+ if self.cfg.kickstart_default:
+ self.log.warning(_("Both --kickstart-default and --isolinux-cfg have been specified, while they are mutually exclusive. --isolinux-cfg is going to be used."))
+ self.cfg.kickstart_default = False
def check_setting_isolinux_cfg(self, val):
if os.access(val, os.R_OK):
@@ -76,7 +79,7 @@
os.unlink(os.path.join(self.cfg.working_directory, "revisor-pungi", self.cfg.version, self.cfg.model, self.cfg.architecture, "os", "isolinux", "isolinux.cfg"))
self.log.debug(_("Deleted the old isolinux.cfg"), level=9)
try:
- shutil.copy(self.cfg.isolinux_cfg, os.path.join(self.cfg.working_directory, "revisor-pungi", self.cfg.version, self.cfg.model, self.cfg.architecture, "os", "isolinux"))
+ shutil.copy(self.cfg.isolinux_cfg, os.path.join(self.cfg.working_directory, "revisor-pungi", self.cfg.version, self.cfg.model, self.cfg.architecture, "os", "isolinux", "isolinux.cfg"))
self.log.debug(_("Inserted the new isolinux.cfg"), level=9)
except:
self.log.warning(_("Could not copy in the new isolinux.cfg"))
--
---
Paul B Schroeder <paul.schroeder "at" bluecoat "dot" com>
Blue Coat Systems, Inc.