From 48a77828e7242a11602b83046e87eada787dc8da Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Fri, 11 Sep 2009 23:56:15 -0500 Subject: [PATCH] Set a default value for livecd/iso --- ChangeLog | 4 ++++ modules/catalyst/target/generic_stage.py | 21 +++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index d1df9e0c..4f9ac400 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ # Distributed under the GPL v2 # $Id$ + 12 Sep 2009; Andrew Gaffney + modules/catalyst/target/generic_stage.py: + Set a default value for livecd/iso + 12 Sep 2009; Andrew Gaffney catalyst: Move commandline parsing to function diff --git a/modules/catalyst/target/generic_stage.py b/modules/catalyst/target/generic_stage.py index c707c24e..1ce41a2c 100644 --- a/modules/catalyst/target/generic_stage.py +++ b/modules/catalyst/target/generic_stage.py @@ -278,16 +278,17 @@ class generic_stage_target(generic_target): os.makedirs(self.settings["storedir"]+"/builds/") def set_iso(self): - if "iso" in self.settings: - if self.settings["iso"].startswith('/'): - self.settings["iso"]=\ - catalyst.util.normpath(self.settings["iso"]) - else: - # This automatically prepends the build dir to the ISO output path - # if it doesn't start with a / - self.settings["iso"] = catalyst.util.normpath(self.settings["storedir"] + \ - "/builds/" + self.settings["rel_type"] + "/" + \ - self.settings["iso"]) + if not "iso" in self.settings: + self.settings["iso"] = "livecd-" + self.settings["subarch"] + "-" + self.settings["version_stamp"] + ".iso" + if self.settings["iso"].startswith('/'): + self.settings["iso"]=\ + catalyst.util.normpath(self.settings["iso"]) + else: + # This automatically prepends the build dir to the ISO output path + # if it doesn't start with a / + self.settings["iso"] = catalyst.util.normpath(self.settings["storedir"] + \ + "/builds/" + self.settings["rel_type"] + "/" + \ + self.settings["iso"]) def set_fstype(self): if not "fstype" in self.settings: -- 2.26.2