allow portdir_overlay to be part of all specs not including snapshot spec. Add warni...
authorEric Edgar <rocket@gentoo.org>
Tue, 13 Dec 2005 20:32:43 +0000 (20:32 +0000)
committerEric Edgar <rocket@gentoo.org>
Tue, 13 Dec 2005 20:32:43 +0000 (20:32 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@964 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
modules/generic_stage_target.py
modules/snapshot_target.py
modules/stage1_target.py
modules/stage2_target.py
modules/stage3_target.py

index 6439bad501a85151cf9384728f996b6efeb08625..260263dceeda0e681ec3d4d3565fdeeef5167035 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.451 2005/12/13 19:31:13 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.452 2005/12/13 20:32:43 rocket Exp $
+
+  13 Dec 2005; Eric Edgar <rocket@gentoo.org>
+  modules/generic_stage_target.py, modules/snapshot_target.py,
+  modules/stage1_target.py, modules/stage2_target.py,
+  modules/stage3_target.py:
+  allow portdir_overlay to be part of all specs not including snapshot spec.
+  Add warnings for stage1,2 and 3 in case someone uses this feature there.
+  Remove overlay support from the snapshot spec but added a warning.
 
   13 Dec 2005; Eric Edgar <rocket@gentoo.org> modules/stage1_target.py,
   modules/stage2_target.py:
index 6c55e7cb931230b6052ed3ea863e43483910acd3..5d503df58d1f21c525ca1caabe121b6f1e455c9e 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.97 2005/12/11 20:34:42 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.98 2005/12/13 20:32:43 rocket Exp $
 
 """
 This class does all of the chroot setup, copying of files, etc. It is
@@ -145,7 +145,7 @@ class generic_stage_target(generic_target):
                self.set_iso()
                self.set_packages()
                self.set_rm()
-       
+               self.set_portage_overlay()      
                # this next line checks to make sure that the specified variables exist on disk.
                #pdb.set_trace()
                file_locate(self.settings,["source_path","snapshot_path","distdir"],expand=0)
@@ -390,7 +390,7 @@ class generic_stage_target(generic_target):
        def set_action_sequence(self):
                #Default action sequence for run method
                self.settings["action_sequence"]=["unpack","unpack_snapshot",\
-                               "config_profile_link","setup_confdir","bind","chroot_setup",\
+                               "config_profile_link","setup_confdir","portage_overlay","bind","chroot_setup",\
                                "setup_environment","run_local","preclean","unbind","clean","capture","clear_autoresume"]
        
        def set_use(self):
@@ -415,6 +415,11 @@ class generic_stage_target(generic_target):
                if type(self.settings[self.settings["spec_prefix"]+"/rm"])==types.StringType:
                    self.settings[self.settings["spec_prefix"]+"/rm"]=self.settings[self.settings["spec_prefix"]+"/rm"].split()
 
+       def set_portage_overlay(self):
+           if self.settings.has_key("portage_overlay"):
+               if type(self.settings["portage_overlay"])==types.StringType:
+                       self.settings["portage_overlay"]=[self.settings["portage_overlay"]]
+
        def set_root_path(self):
                # ROOT= variable for emerges
                self.settings["root_path"]="/"
@@ -685,9 +690,6 @@ class generic_stage_target(generic_target):
            # copy over the portage overlays
            # Always copy over the overlay incase it has changed
            if self.settings.has_key("portage_overlay"):
-               if type(self.settings["portage_overlay"])==types.StringType:
-                       self.settings["portage_overlay"]=[self.settings["portage_overlay"]]
-               
                for x in self.settings["portage_overlay"]: 
                        if os.path.exists(x):
                                print "Copying overlay dir " +x
index 0dbba4bdd8252c62019f3ab7bda582997eb7d667..dacda68cb24b37f9a2e30816404b2018d01b519c 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/snapshot_target.py,v 1.13 2005/12/05 18:13:12 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/snapshot_target.py,v 1.14 2005/12/13 20:32:43 rocket Exp $
 
 """
 Builder class for snapshots.
@@ -22,6 +22,13 @@ class snapshot_target(generic_target):
                self.settings["snapshot_path"]=normpath(st+"/snapshots/portage-"+self.settings["version_stamp"]\
                        +".tar.bz2")
                self.settings["tmp_path"]=normpath(st+"/tmp/"+self.settings["target_subpath"])
+               if self.settings.has_key("portdir_overlay"):
+                       print "\nWarning!!!!"
+                       print "\tThis feature is deprecated no overlay will be added to the snapshot."
+                       print "\tIf you need an overlay feature please use portdir_overlay in the other spec files"
+                       print "\tOtherwise add your files to the normal snapshot and redigest .. you should know what"
+                       print "\t\tto do."
+                       print "\tThis was removed due to digesting issues that are incompatible with portage."
 
        def setup(self):
                x=normpath(self.settings["storedir"]+"/snapshots")
@@ -43,11 +50,11 @@ class snapshot_target(generic_target):
                cmd("rsync -a --delete --exclude /packages/ --exclude /distfiles/ --exclude /local/ --exclude CVS/ "+\
                        self.settings["portdir"]+"/ "+mytmp+"/portage/","Snapshot failure",env=self.env)
                
-               if self.settings.has_key("portdir_overlay"):
-                       print "Adding Portage overlay to the snapshot..."
-                       cmd("rsync -a --exclude /packages/ --exclude /distfiles/ --exclude /local/ --exclude CVS/ "+\
-                               self.settings["portdir_overlay"]+"/ "+mytmp+"/portage/","Snapshot/ overlay addition failure",\
-                               env=self.env)
+               #if self.settings.has_key("portdir_overlay"):
+                       #print "Adding Portage overlay to the snapshot..."
+                       #cmd("rsync -a --exclude /packages/ --exclude /distfiles/ --exclude /local/ --exclude CVS/ "+\
+                       #       self.settings["portdir_overlay"]+"/ "+mytmp+"/portage/","Snapshot/ overlay addition failure",\
+                       #       env=self.env)
                        
                print "Compressing Portage snapshot tarball..."
                cmd("tar cjf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\
index cbb58e00dc79e9f31022b0ea0a3f9b9f6dc01d63..578f859c6dda2a555463d8b00361f9f8c514d08d 100644 (file)
@@ -1,6 +1,6 @@
 # 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.17 2005/12/13 19:31:13 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage1_target.py,v 1.18 2005/12/13 20:32:43 rocket Exp $
 
 """
 Builder class for a stage1 installation tarball build.
@@ -28,6 +28,12 @@ class stage1_target(generic_stage_target):
                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 set_portage_overlay(self):
+               generic_stage_target.set_portage_overlay(self)
+               print "\nWARNING !!!!!"
+               print "\tUsing an overlay for earlier stages could cause build issues."
+               print "\tIf you break it, you buy it. Don't complain to us about it."
+               print "\tDont say we did not warn you\n"
 def register(foo):
        foo.update({"stage1":stage1_target})
        return foo
index a2d9aa6f13a347bdfb74904dc21e23096b1b760f..e2331fa00bb8c6cc65d0de4faa5ed95434da5695 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage2_target.py,v 1.8 2005/12/13 19:31:13 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage2_target.py,v 1.9 2005/12/13 20:32:43 rocket Exp $
 
 """
 Builder class for a stage2 installation tarball build.
@@ -56,6 +56,13 @@ class stage2_target(generic_stage_target):
             if self.settings.has_key("ldflags"):
                 self.settings["LDFLAGS"]=list_to_string(self.settings["ldflags"])
 
+        def set_portage_overlay(self):
+                generic_stage_target.set_portage_overlay(self)
+                print "\nWARNING !!!!!"
+                print "\tUsing an overlay for earlier stages could cause build issues."
+                print "\tIf you break it, you buy it. Don't complain to us about it."
+                print "\tDont say we did not warn you\n"
+
 
 def register(foo):
        foo.update({"stage2":stage2_target})
index c951e57c21beff3be148c49e590816d109aca525..f60d5d256a0692474194ebc05dc49ab5da4077e8 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage3_target.py,v 1.4 2005/07/05 21:53:41 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage3_target.py,v 1.5 2005/12/13 20:32:43 rocket Exp $
 
 """
 Builder class for a stage3 installation tarball build.
@@ -15,6 +15,13 @@ class stage3_target(generic_stage_target):
                self.valid_values=[]
                generic_stage_target.__init__(self,spec,addlargs)
 
+        def set_portage_overlay(self):
+                generic_stage_target.set_portage_overlay(self)
+                print "\nWARNING !!!!!"
+                print "\tUsing an overlay for earlier stages could cause build issues."
+                print "\tIf you break it, you buy it. Don't complain to us about it."
+                print "\tDont say we did not warn you\n"
+
 def register(foo):
        foo.update({"stage3":stage3_target})
        return foo