Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 70663 | Differences between
and this patch

Collapse All | Expand All

(-)catalyst/modules/generic_stage_target.py (-27 / +27 lines)
Lines 98-127 Link Here
98
				self.settings[envvar] = os.environ[envvar]
98
				self.settings[envvar] = os.environ[envvar]
99
		
99
		
100
		# define all of our core variables
100
		# define all of our core variables
101
		self.settings["target_profile"]=self.settings["profile"]
101
		self.set_target_profile()
102
		self.settings["target_subpath"]=self.settings["rel_type"]+"/"+self.settings["target"]+\
102
		self.set_target_subpath()
103
			"-"+self.settings["subarch"]+"-"+self.settings["version_stamp"]
103
		self.set_snapshot_path()
104
			
104
		self.set_target_path()
105
		st=self.settings["storedir"]
105
		self.set_source_path()
106
		self.settings["snapshot_path"]=st+"/snapshots/portage-"+self.settings["snapshot"]+".tar.bz2"
106
		self.set_chroot_path()
107
		if self.settings["target"] in ["grp","tinderbox"]:
108
			# grp creates a directory of packages and sources rather than a compressed tarball
109
			self.settings["target_path"]=st+"/builds/"+self.settings["target_subpath"]
110
			self.settings["source_path"]=st+"/builds/"+self.settings["source_subpath"]+".tar.bz2"
111
		
112
		elif self.settings["target"] == "livecd-stage2":
113
			self.settings["source_path"]=st+"/tmp/"+self.settings["source_subpath"]
114
			self.settings["cdroot_path"]=st+"/builds/"+self.settings["target_subpath"]
115
			
116
		elif self.settings["target"] == "netboot":
117
			self.settings["target_path"]=st+"/builds/"+self.settings["target_subpath"]
118
			self.settings["source_path"]=st+"/builds/"+self.settings["source_subpath"]+".tar.bz2"
119
		
120
		else:
121
			self.settings["target_path"]=st+"/builds/"+self.settings["target_subpath"]+".tar.bz2"
122
			self.settings["source_path"]=st+"/builds/"+self.settings["source_subpath"]+".tar.bz2"
123
		
124
		self.settings["chroot_path"]=st+"/tmp/"+self.settings["target_subpath"]
125
		
107
		
126
		# this next line checks to make sure that the specified variables exist on disk.
108
		# this next line checks to make sure that the specified variables exist on disk.
127
		file_locate(self.settings,["source_path","snapshot_path","distdir"],expand=0)
109
		file_locate(self.settings,["source_path","snapshot_path","distdir"],expand=0)
Lines 134-147 Link Here
134
		self.mounts=[ "/proc","/dev","/dev/pts","/usr/portage/distfiles" ]
116
		self.mounts=[ "/proc","/dev","/dev/pts","/usr/portage/distfiles" ]
135
		self.mountmap={"/proc":"/proc", "/dev":"/dev", "/dev/pts":"/dev/pts",\
117
		self.mountmap={"/proc":"/proc", "/dev":"/dev", "/dev/pts":"/dev/pts",\
136
			"/usr/portage/distfiles":self.settings["distdir"]}
118
			"/usr/portage/distfiles":self.settings["distdir"]}
137
		
138
		if self.settings["target"]=="grp":
119
		if self.settings["target"]=="grp":
139
			self.mounts.append("/tmp/grp")
120
			self.mounts.append("/tmp/grp")
140
			self.mountmap["/tmp/grp"]=self.settings["target_path"]
121
			self.mountmap["/tmp/grp"]=self.settings["target_path"]
141
122
142
		# configure any user specified options (either in catalyst.conf or on the cmdline)
123
		# configure any user specified options (either in catalyst.conf or on the cmdline)
143
		if self.settings.has_key("PKGCACHE"):
124
		if self.settings.has_key("PKGCACHE"):
144
			self.settings["pkgcache_path"]=st+"/packages/"+self.settings["target_subpath"]
125
			self.settings["pkgcache_path"]=self.settings["storedir"]+"/packages/"+self.settings["target_subpath"]
145
			self.mounts.append("/usr/portage/packages")
126
			self.mounts.append("/usr/portage/packages")
146
			self.mountmap["/usr/portage/packages"]=self.settings["pkgcache_path"]
127
			self.mountmap["/usr/portage/packages"]=self.settings["pkgcache_path"]
147
128
Lines 158-164 Link Here
158
			self.mountmap["/var/tmp/ccache"]=ccdir
139
			self.mountmap["/var/tmp/ccache"]=ccdir
159
			# for the chroot:
140
			# for the chroot:
160
			os.environ["CCACHE_DIR"]="/var/tmp/ccache"	
141
			os.environ["CCACHE_DIR"]="/var/tmp/ccache"	
161
			
142
		
143
	def set_target_profile(self):
144
		self.settings["target_profile"]=self.settings["profile"]
145
	
146
	def set_target_subpath(self):
147
		self.settings["target_subpath"]=self.settings["rel_type"]+"/"+self.settings["target"]+\
148
			"-"+self.settings["subarch"]+"-"+self.settings["version_stamp"]
149
150
	def set_target_path(self):
151
		self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+".tar.bz2"
152
	
153
	def set_source_path(self):
154
		self.settings["source_path"]=self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2"
155
	
156
	def set_snapshot_path(self):
157
		self.settings["snapshot_path"]=self.settings["storedir"]+"/snapshots/portage-"+self.settings["snapshot"]+".tar.bz2"
158
	
159
	def set_chroot_path(self):
160
		self.settings["chroot_path"]=self.settings["storedir"]+"/tmp/"+self.settings["target_subpath"]
161
	
162
	def mount_safety_check(self):
162
	def mount_safety_check(self):
163
		mypath=self.settings["chroot_path"]
163
		mypath=self.settings["chroot_path"]
164
		
164
		
(-)catalyst/modules/grp_target.py (-1 / +4 lines)
Lines 28-34 Link Here
28
			self.required_values.append("grp/"+x+"/type")
28
			self.required_values.append("grp/"+x+"/type")
29
			
29
			
30
		generic_stage_target.__init__(self,spec,addlargs)
30
		generic_stage_target.__init__(self,spec,addlargs)
31
31
	
32
	def set_target_path(self):
33
	    self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
34
	
32
	def run_local(self):
35
	def run_local(self):
33
		for pkgset in self.settings["grp"]:
36
		for pkgset in self.settings["grp"]:
34
			# example call: "grp.sh run pkgset cd1 xmms vim sys-apps/gleep"
37
			# example call: "grp.sh run pkgset cd1 xmms vim sys-apps/gleep"
(-)catalyst/modules/livecd_stage2_target.py (-1 / +12 lines)
Lines 42-47 Link Here
42
			"livecd/root_overlay","livecd/devmanager","livecd/splash_type"])
42
			"livecd/root_overlay","livecd/devmanager","livecd/splash_type"])
43
		
43
		
44
		generic_stage_target.__init__(self,spec,addlargs)
44
		generic_stage_target.__init__(self,spec,addlargs)
45
		self.set_cdroot_path()
45
		file_locate(self.settings, ["livecd/cdtar","livecd/archscript","livecd/runscript"])
46
		file_locate(self.settings, ["livecd/cdtar","livecd/archscript","livecd/runscript"])
46
		if self.settings.has_key("portage_confdir"):
47
		if self.settings.has_key("portage_confdir"):
47
			file_locate(self.settings,["portage_confdir"],expand=0)
48
			file_locate(self.settings,["portage_confdir"],expand=0)
Lines 84-90 Link Here
84
			if retval!=0:
85
			if retval!=0:
85
				self.unbind()
86
				self.unbind()
86
				raise CatalystError,"Couldn't bind mount "+src
87
				raise CatalystError,"Couldn't bind mount "+src
87
			
88
        
89
	def set_target_path(self):
90
	    pass 
91
	    #self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
92
	    	
93
	def set_source_path(self):
94
	    self.settings["source_path"]=self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]
95
	
96
	def set_cdroot_path(self):
97
	    self.settings["cdroot_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
98
88
	def unmerge(self):
99
	def unmerge(self):
89
		if self.settings.has_key("AUTORESUME") \
100
		if self.settings.has_key("AUTORESUME") \
90
			and os.path.exists(self.settings["chroot_path"]+"/tmp/.clst_unmerge"):
101
			and os.path.exists(self.settings["chroot_path"]+"/tmp/.clst_unmerge"):
(-)catalyst/modules/netboot.py (+3 lines)
Lines 53-58 Link Here
53
			if not os.environ.has_key(envvar) and not addlargs.has_key(envvar):
53
			if not os.environ.has_key(envvar) and not addlargs.has_key(envvar):
54
				self.settings[envvar] = "-Os -pipe"
54
				self.settings[envvar] = "-Os -pipe"
55
	
55
	
56
	def set_target_path(self):
57
	    self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
58
	
56
	def run_local(self):
59
	def run_local(self):
57
		# setup our chroot
60
		# setup our chroot
58
		try:
61
		try:
(-)catalyst/modules/tinderbox_target.py (+3 lines)
Lines 26-31 Link Here
26
		except CatalystError:
26
		except CatalystError:
27
			self.unbind()
27
			self.unbind()
28
			raise CatalystError,"Tinderbox aborting due to error."
28
			raise CatalystError,"Tinderbox aborting due to error."
29
	
30
	def set_target_path(self):
31
	    self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
29
32
30
def register(foo):
33
def register(foo):
31
	foo.update({"tinderbox":tinderbox_target})
34
	foo.update({"tinderbox":tinderbox_target})

Return to bug 70663