Automatically prepend build dir path to livecd/iso if it's not an absolute path
authoragaffney <agaffney@kagome.(none)>
Mon, 29 Sep 2008 02:52:32 +0000 (21:52 -0500)
committeragaffney <agaffney@kagome.(none)>
Mon, 29 Sep 2008 02:52:32 +0000 (21:52 -0500)
ChangeLog
modules/generic_stage_target.py

index d655af693d09720904d66beb339ac29a5764882e..4c61e7015ed1a666e916c1f8913676be57725a9e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Id: $
 
+  29 Sep 2008; Andrew Gaffney <agaffney@gentoo.org>
+  modules/generic_stage_target.py:
+  Automatically prepend build dir path to livecd/iso if it's not an absolute
+  path
+
   28 Sep 2008; Andrew Gaffney <agaffney@gentoo.org> TODO:
   Update TODO with placeholder idea
 
index 5fba3b8cebad61f527256844cbde47da9b3a4ce5..9be4c41920de6494f48a6f650caee23281dc01ae 100644 (file)
@@ -333,8 +333,15 @@ class generic_stage_target(generic_target):
 
        def set_iso(self):
                if self.settings.has_key(self.settings["spec_prefix"]+"/iso"):
-                       self.settings["iso"]=\
-                               normpath(self.settings[self.settings["spec_prefix"]+"/iso"])
+                       if self.settings[self.settings["spec_prefix"]+"iso"].startswith('/'):
+                               self.settings["iso"]=\
+                                       normpath(self.settings[self.settings["spec_prefix"]+"/iso"])
+                       else:
+                               # This automatically prepends the build dir to the ISO output path
+                               # if it doesn't start with a /
+                               self.settings["iso"] = normpath(self.settings["storedir"] + \
+                                       "/builds/" + self.settings["rel_type"] + "/" + \
+                                       self.settings[self.settings["spec_prefix"]+"iso"])
                        del self.settings[self.settings["spec_prefix"]+"/iso"]
 
        def set_fstype(self):