Set a default value for livecd/iso
authorAndrew Gaffney <agaffney@gentoo.org>
Sat, 12 Sep 2009 04:56:15 +0000 (23:56 -0500)
committerAndrew Gaffney <agaffney@gentoo.org>
Sat, 12 Sep 2009 04:56:15 +0000 (23:56 -0500)
ChangeLog
modules/catalyst/target/generic_stage.py

index d1df9e0cb57f2693852b4038190831209e7f1ad9..4f9ac4008d1d20790f49c2ab16ad3d11ef8ef4fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,10 @@
 # Distributed under the GPL v2
 # $Id$
 
+  12 Sep 2009; Andrew Gaffney <agaffney@gentoo.org>
+  modules/catalyst/target/generic_stage.py:
+  Set a default value for livecd/iso
+
   12 Sep 2009; Andrew Gaffney <agaffney@gentoo.org> catalyst:
   Move commandline parsing to function
 
index c707c24ec15fb0865b51b0ff6111e5aeb9cabf2b..1ce41a2c02305ee8e6f6b1f0d53b25cffc4a7ba1 100644 (file)
@@ -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: