Allow changing the location of the pkg_cache in stage4 or livecd-stage1
authorEric Edgar <rocket@gentoo.org>
Thu, 23 Jun 2005 15:42:50 +0000 (15:42 +0000)
committerEric Edgar <rocket@gentoo.org>
Thu, 23 Jun 2005 15:42:50 +0000 (15:42 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@710 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
modules/generic_stage_target.py
modules/livecd_stage1_target.py
modules/stage4_target.py

index 509833c0951cab8a4cb6c75081818a8c7e95f185..b0247f485e0287c69b4c75944b72e8e1414f0dfc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.276 2005/06/22 18:53:49 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.277 2005/06/23 15:42:50 rocket Exp $
+
+  23 Jun 2005; Eric Edgar <rocket@gentoo.org>
+  modules/generic_stage_target.py, modules/livecd_stage1_target.py,
+  modules/stage4_target.py:
+  Allow changing the location of the pkg_cache in stage4 or livecd-stage1
 
   22 Jun 2005; Eric Edgar <rocket@gentoo.org> :
   Fix issue where -s on the command line would not run
index 73a4258c31fd04cb3599af99aae031435474b111..b14d6cf005ecff50da14708cba2eb3661bc1c9d1 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 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.46 2005/05/18 18:09:14 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.47 2005/06/23 15:42:50 rocket Exp $
 
 """
 This class does all of the chroot setup, copying of files, etc. It is
@@ -147,7 +147,8 @@ class generic_stage_target(generic_target):
 
                # configure any user specified options (either in catalyst.conf or on the cmdline)
                if self.settings.has_key("PKGCACHE"):
-                       self.settings["pkgcache_path"]=self.settings["storedir"]+"/packages/"+self.settings["target_subpath"]
+                       self.set_pkgcache_path()
+                       print "Location of the package cache is" + self.settings["pkgcache_path"]
                        self.mounts.append("/usr/portage/packages")
                        self.mountmap["/usr/portage/packages"]=self.settings["pkgcache_path"]
 
@@ -207,6 +208,10 @@ class generic_stage_target(generic_target):
                self.settings["target_subpath"]=self.settings["rel_type"]+"/"+self.settings["target"]+\
                        "-"+self.settings["subarch"]+"-"+self.settings["version_stamp"]
 
+       def set_pkgcache_path(self):
+               self.settings["pkgcache_path"]=self.settings["storedir"]+"/packages/"+\
+                       self.settings["target_subpath"]
+
        def set_target_path(self):
                self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+".tar.bz2"
                if self.settings.has_key("AUTORESUME") \
index 3fae838671181c40366dfa10acb9b6c85b2b5e90..2b93e8656bf3c4f84e40ee93d4a73534b5a2ff26 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.12 2005/04/27 17:44:58 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.13 2005/06/23 15:42:50 rocket Exp $
 
 """
 Builder class for LiveCD stage1.
@@ -46,6 +46,13 @@ class livecd_stage1_target(generic_stage_target):
            if self.settings.has_key(self.settings["spec_prefix"]+"/packages"):
                self.settings[self.settings["spec_prefix"]+"/packages"].append("livecd-tools")
 
+       def set_pkgcache_path(self):
+           if self.settings.has_key("pkgcache_path"):
+               if type(self.settings["pkgcache_path"]) != types.StringType:
+                   self.settings["pkgcache_path"]=string.join(self.settings["pkgcache_path"])
+           else:
+               generic_stage_target.set_pkgcache_path(self)
+
 def register(foo):
        foo.update({"livecd-stage1":livecd_stage1_target})
        return foo
index cbc5acb10845e1269c4b2de831336cf77d1c82b3..fe6b62a33ed9180c4ba03e320f327bcd35084cce 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage4_target.py,v 1.6 2005/04/27 17:59:35 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage4_target.py,v 1.7 2005/06/23 15:42:50 rocket Exp $
 
 """
 Builder class for LiveCD stage1.
@@ -17,7 +17,14 @@ class stage4_target(generic_stage_target):
                self.valid_values.extend(["stage4/use", "stage4/packages", "stage4/root_overlay", "stage4/fsscript", \
                                             "stage4/rcadd","stage4/rcdel"])
                generic_stage_target.__init__(self,spec,addlargs)
-       
+
+       def set_pkgcache_path(self):
+           if self.settings.has_key("pkgcache_path"):  
+               if type(self.settings["pkgcache_path"]) != types.StringType:
+                   self.settings["pkgcache_path"]=string.join(self.settings["pkgcache_path"])
+           else:
+               generic_stage_target.set_pkgcache_path(self)
+
        def set_cleanables(self):
                self.settings["cleanables"]=["/var/tmp/*","/tmp/*"]