Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 43653 Details for
Bug 70663
Separate specific target logic out of the generic targets modules
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
This patch defines the routines needed to fill the self.settings variable
catalyst_patch1.patch (text/plain), 6.82 KB, created by
Eric Edgar (RETIRED)
on 2004-11-10 06:44:56 UTC
(
hide
)
Description:
This patch defines the routines needed to fill the self.settings variable
Filename:
MIME Type:
Creator:
Eric Edgar (RETIRED)
Created:
2004-11-10 06:44:56 UTC
Size:
6.82 KB
patch
obsolete
>diff -urN catalyst/modules/generic_stage_target.py catalyst.new/modules/generic_stage_target.py >--- catalyst/modules/generic_stage_target.py 2004-10-28 10:08:19.000000000 -0500 >+++ catalyst.new/modules/generic_stage_target.py 2004-11-09 09:40:07.000000000 -0600 >@@ -98,30 +98,12 @@ > self.settings[envvar] = os.environ[envvar] > > # define all of our core variables >- self.settings["target_profile"]=self.settings["profile"] >- self.settings["target_subpath"]=self.settings["rel_type"]+"/"+self.settings["target"]+\ >- "-"+self.settings["subarch"]+"-"+self.settings["version_stamp"] >- >- st=self.settings["storedir"] >- self.settings["snapshot_path"]=st+"/snapshots/portage-"+self.settings["snapshot"]+".tar.bz2" >- if self.settings["target"] in ["grp","tinderbox"]: >- # grp creates a directory of packages and sources rather than a compressed tarball >- self.settings["target_path"]=st+"/builds/"+self.settings["target_subpath"] >- self.settings["source_path"]=st+"/builds/"+self.settings["source_subpath"]+".tar.bz2" >- >- elif self.settings["target"] == "livecd-stage2": >- self.settings["source_path"]=st+"/tmp/"+self.settings["source_subpath"] >- self.settings["cdroot_path"]=st+"/builds/"+self.settings["target_subpath"] >- >- elif self.settings["target"] == "netboot": >- self.settings["target_path"]=st+"/builds/"+self.settings["target_subpath"] >- self.settings["source_path"]=st+"/builds/"+self.settings["source_subpath"]+".tar.bz2" >- >- else: >- self.settings["target_path"]=st+"/builds/"+self.settings["target_subpath"]+".tar.bz2" >- self.settings["source_path"]=st+"/builds/"+self.settings["source_subpath"]+".tar.bz2" >- >- self.settings["chroot_path"]=st+"/tmp/"+self.settings["target_subpath"] >+ self.set_target_profile() >+ self.set_target_subpath() >+ self.set_snapshot_path() >+ self.set_target_path() >+ self.set_source_path() >+ self.set_chroot_path() > > # this next line checks to make sure that the specified variables exist on disk. > file_locate(self.settings,["source_path","snapshot_path","distdir"],expand=0) >@@ -134,14 +116,13 @@ > self.mounts=[ "/proc","/dev","/dev/pts","/usr/portage/distfiles" ] > self.mountmap={"/proc":"/proc", "/dev":"/dev", "/dev/pts":"/dev/pts",\ > "/usr/portage/distfiles":self.settings["distdir"]} >- > if self.settings["target"]=="grp": > self.mounts.append("/tmp/grp") > self.mountmap["/tmp/grp"]=self.settings["target_path"] > > # configure any user specified options (either in catalyst.conf or on the cmdline) > if self.settings.has_key("PKGCACHE"): >- self.settings["pkgcache_path"]=st+"/packages/"+self.settings["target_subpath"] >+ self.settings["pkgcache_path"]=self.settings["storedir"]+"/packages/"+self.settings["target_subpath"] > self.mounts.append("/usr/portage/packages") > self.mountmap["/usr/portage/packages"]=self.settings["pkgcache_path"] > >@@ -158,7 +139,26 @@ > self.mountmap["/var/tmp/ccache"]=ccdir > # for the chroot: > os.environ["CCACHE_DIR"]="/var/tmp/ccache" >- >+ >+ def set_target_profile(self): >+ self.settings["target_profile"]=self.settings["profile"] >+ >+ def set_target_subpath(self): >+ self.settings["target_subpath"]=self.settings["rel_type"]+"/"+self.settings["target"]+\ >+ "-"+self.settings["subarch"]+"-"+self.settings["version_stamp"] >+ >+ def set_target_path(self): >+ self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+".tar.bz2" >+ >+ def set_source_path(self): >+ self.settings["source_path"]=self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2" >+ >+ def set_snapshot_path(self): >+ self.settings["snapshot_path"]=self.settings["storedir"]+"/snapshots/portage-"+self.settings["snapshot"]+".tar.bz2" >+ >+ def set_chroot_path(self): >+ self.settings["chroot_path"]=self.settings["storedir"]+"/tmp/"+self.settings["target_subpath"] >+ > def mount_safety_check(self): > mypath=self.settings["chroot_path"] > >diff -urN catalyst/modules/grp_target.py catalyst.new/modules/grp_target.py >--- catalyst/modules/grp_target.py 2004-10-28 10:08:19.000000000 -0500 >+++ catalyst.new/modules/grp_target.py 2004-11-09 09:25:43.000000000 -0600 >@@ -28,7 +28,10 @@ > self.required_values.append("grp/"+x+"/type") > > generic_stage_target.__init__(self,spec,addlargs) >- >+ >+ def set_target_path(self): >+ self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"] >+ > def run_local(self): > for pkgset in self.settings["grp"]: > # example call: "grp.sh run pkgset cd1 xmms vim sys-apps/gleep" >diff -urN catalyst/modules/livecd_stage2_target.py catalyst.new/modules/livecd_stage2_target.py >--- catalyst/modules/livecd_stage2_target.py 2004-10-28 10:08:19.000000000 -0500 >+++ catalyst.new/modules/livecd_stage2_target.py 2004-11-09 09:23:30.000000000 -0600 >@@ -42,6 +42,7 @@ > "livecd/root_overlay","livecd/devmanager","livecd/splash_type"]) > > generic_stage_target.__init__(self,spec,addlargs) >+ self.set_cdroot_path() > file_locate(self.settings, ["livecd/cdtar","livecd/archscript","livecd/runscript"]) > if self.settings.has_key("portage_confdir"): > file_locate(self.settings,["portage_confdir"],expand=0) >@@ -84,7 +85,17 @@ > if retval!=0: > self.unbind() > raise CatalystError,"Couldn't bind mount "+src >- >+ >+ def set_target_path(self): >+ pass >+ #self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"] >+ >+ def set_source_path(self): >+ self.settings["source_path"]=self.settings["storedir"]+"/builds/"+self.settings["source_subpath"] >+ >+ def set_cdroot_path(self): >+ self.settings["cdroot_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"] >+ > def unmerge(self): > if self.settings.has_key("AUTORESUME") \ > and os.path.exists(self.settings["chroot_path"]+"/tmp/.clst_unmerge"): >diff -urN catalyst/modules/netboot.py catalyst.new/modules/netboot.py >--- catalyst/modules/netboot.py 2004-10-28 10:08:19.000000000 -0500 >+++ catalyst.new/modules/netboot.py 2004-11-09 09:19:49.000000000 -0600 >@@ -53,6 +53,9 @@ > if not os.environ.has_key(envvar) and not addlargs.has_key(envvar): > self.settings[envvar] = "-Os -pipe" > >+ def set_target_path(self): >+ self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"] >+ > def run_local(self): > # setup our chroot > try: >diff -urN catalyst/modules/tinderbox_target.py catalyst.new/modules/tinderbox_target.py >--- catalyst/modules/tinderbox_target.py 2004-10-28 10:08:19.000000000 -0500 >+++ catalyst.new/modules/tinderbox_target.py 2004-11-09 09:19:20.000000000 -0600 >@@ -26,6 +26,9 @@ > except CatalystError: > self.unbind() > raise CatalystError,"Tinderbox aborting due to error." >+ >+ def set_target_path(self): >+ self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"] > > def register(foo): > foo.update({"tinderbox":tinderbox_target})
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 70663
:
43653
|
43654
|
43655
|
43662
|
43664
|
43729
|
47598
|
47624