Fix stage1 to NOT contain the code from stage2;continued cleanup from the space fix...
authorEric Edgar <rocket@gentoo.org>
Sun, 4 Dec 2005 17:09:57 +0000 (17:09 +0000)
committerEric Edgar <rocket@gentoo.org>
Sun, 4 Dec 2005 17:09:57 +0000 (17:09 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@935 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
modules/stage1_target.py

index 52a4f48c0f69d4478d431a7ffd440381b88e3a15..2f28ec0365a6266f819296d4e9347bcf0900fdbc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.422 2005/12/02 21:59:46 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.423 2005/12/04 17:09:57 rocket Exp $
+
+  04 Dec 2005; Eric Edgar <rocket@gentoo.org> modules/stage1_target.py:
+  Fix stage1 to NOT contain the code from stage2;continued cleanup from the
+  space fix issue
 
   02 Dec 2005; Chris Gianelloni <wolf31o2@gentoo.org>
   examples/generic_stage_template.spec:
index b3a1f4203e9401ecc1db5c68e47951c6e1cebcfd..7fff35a349d1f84b242e079df76800611578f09e 100644 (file)
@@ -1,38 +1,57 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage1_target.py,v 1.15 2005/12/02 20:09:03 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage1_target.py,v 1.16 2005/12/04 17:09:57 rocket Exp $
 
 """
-Builder class for a stage2 installation tarball build.
+Builder class for a stage1 installation tarball build.
 """
 
 from catalyst_support import *
 from generic_stage_target import *
 
-class stage2_target(generic_stage_target):
+class stage1_target(generic_stage_target):
        def __init__(self,spec,addlargs):
                self.required_values=[]
                self.valid_values=[]
                generic_stage_target.__init__(self,spec,addlargs)
+       
+       def set_stage_path(self):
+               self.settings["stage_path"]=normpath(self.settings["chroot_path"]+self.settings["root_path"])
+               print "stage1 stage path is "+self.settings["stage_path"]
        def set_root_path(self):
-               # ROOT= variable for emerges
-                self.settings["root_path"]=normpath("/tmp/stage1root")
-
-        def set_source_path(self):
-            self.settings["source_path"]=normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/"+self.settings["root_path"]+"/")
-
-           # reset the root path so the preclean doesnt fail
-           generic_stage_target.set_root_path(self)
-            
-           if os.path.isdir(self.settings["source_path"]):
-                print "\nUsing seed-stage from "+self.settings["source_path"]
-                print "Delete this folder if you wish to use a seed stage tarball instead\n"
-            else:
-                self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2")
-                if os.path.isfile(self.settings["source_path"]):
-                        if os.path.exists(self.settings["source_path"]):
-                                 self.settings["source_path_md5sum"]=calc_md5(self.settings["source_path"])
+              # ROOT= variable for emerges
+               self.settings["root_path"]=normpath("/tmp/stage1root")
+               print "stage1 root path is "+self.settings["root_path"]
+       def set_dest_path(self):
+                self.settings["destpath"]=normpath(self.settings["chroot_path"]+self.settings["root_path"])
+       def set_cleanables(self):
+               generic_stage_target.set_cleanables(self)
+               self.settings["cleanables"].extend(["/usr/share/gettext","/usr/lib/python2.2/test", "/usr/lib/python2.2/encodings","/usr/lib/python2.2/email", "/usr/lib/python2.2/lib-tk","/usr/share/zoneinfo"])
+
+       def override_chost(self):
+           if os.environ.has_key("CHOST"):
+               self.settings["CHOST"] = os.environ["CHOST"]
+           if self.settings.has_key("chost"):
+               self.settings["CHOST"]=list_to_string(self.settings["chost"])
+
+       def override_cflags(self):
+           if os.environ.has_key("CFLAGS"):
+               self.settings["CFLAGS"] = os.environ["CFLAGS"]
+           if self.settings.has_key("cflags"):
+               self.settings["CFLAGS"]=list_to_string(self.settings["cflags"])
+
+       def override_cxxflags(self):
+           if os.environ.has_key("CXXFLAGS"):
+               self.settings["CXXFLAGS"] = os.environ["CXXFLAGS"]
+           if self.settings.has_key("cxxflags"):
+               self.settings["CXXFLAGS"]=list_to_string(self.settings["cxxflags"])
+
+        def override_ldflags(self):
+           if os.environ.has_key("LDFLAGS"):
+               self.settings["LDFLAGS"] = os.environ["LDFLAGS"]
+           if self.settings.has_key("ldflags"):
+               self.settings["LDFLAGS"]=list_to_string(self.settings["ldflags"])
 
 def register(foo):
-       foo.update({"stage2":stage2_target})
+       foo.update({"stage1":stage1_target})
        return foo