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

Collapse All | Expand All

(-)modules.old/generic_stage_target.py (-12 / +8 lines)
Lines 126-140 Link Here
126
		# this next line checks to make sure that the specified variables exist on disk.
126
		# 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)
127
		file_locate(self.settings,["source_path","snapshot_path","distdir"],expand=0)
128
		
128
		
129
		# if we are using portage_confdir, check that as well
130
		if self.settings.has_key("portage_confdir"):
131
			file_locate(self.settings,["portage_confdir"],expand=0)
132
		
133
		# setup our mount points
129
		# setup our mount points
134
		self.mounts=[ "/proc","/dev","/dev/pts","/usr/portage/distfiles" ]
130
		self.mounts=[ "/proc","/dev","/dev/pts","/usr/portage/distfiles" ]
135
		self.mountmap={"/proc":"/proc", "/dev":"/dev", "/dev/pts":"/dev/pts",\
131
		self.mountmap={"/proc":"/proc", "/dev":"/dev", "/dev/pts":"/dev/pts",\
136
			"/usr/portage/distfiles":self.settings["distdir"]}
132
			"/usr/portage/distfiles":self.settings["distdir"]}
137
		
133
134
		# handle portage_confdir
135
		if self.settings.has_key("portage_confdir"):
136
			file_locate(self.settings,["portage_confdir"],expand=0)
137
			self.mounts.append(self.settings["portage_confdir"])
138
			self.mountmap[self.settings["portage_confdir"]]="/etc/portage"
139
			
138
		if self.settings["target"]=="grp":
140
		if self.settings["target"]=="grp":
139
			self.mounts.append("/tmp/grp")
141
			self.mounts.append("/tmp/grp")
140
			self.mountmap["/tmp/grp"]=self.settings["target_path"]
142
			self.mountmap["/tmp/grp"]=self.settings["target_path"]
Lines 228-239 Link Here
228
		cmd("ln -sf ../usr/portage/profiles/"+self.settings["target_profile"]+\
230
		cmd("ln -sf ../usr/portage/profiles/"+self.settings["target_profile"]+\
229
			" "+self.settings["chroot_path"]+"/etc/make.profile","Error creating profile link")
231
			" "+self.settings["chroot_path"]+"/etc/make.profile","Error creating profile link")
230
		
232
		
231
		if self.settings.has_key("portage_confdir"):
232
			print "Configuring /etc/portage..."
233
			cmd("rm -rf "+self.settings["chroot_path"]+"/etc/portage","Error zapping /etc/portage")
234
			cmd("cp -R "+self.settings["portage_confdir"]+" "+self.settings["chroot_path"]+\
235
				"/etc/portage","Error copying /etc/portage")
236
237
		for x in self.mounts: 
233
		for x in self.mounts: 
238
			if not os.path.exists(self.settings["chroot_path"]+x):
234
			if not os.path.exists(self.settings["chroot_path"]+x):
239
				os.makedirs(self.settings["chroot_path"]+x)
235
				os.makedirs(self.settings["chroot_path"]+x)
Lines 246-252 Link Here
246
			if retval!=0:
242
			if retval!=0:
247
				self.unbind()
243
				self.unbind()
248
				raise CatalystError,"Couldn't bind mount "+src
244
				raise CatalystError,"Couldn't bind mount "+src
249
		
245
			
250
	def unbind(self):
246
	def unbind(self):
251
		ouch=0
247
		ouch=0
252
		mypath=self.settings["chroot_path"]
248
		mypath=self.settings["chroot_path"]
(-)modules.old/livecd_stage2_target.py (-6 / +2 lines)
Lines 46-51 Link Here
46
		file_locate(self.settings, ["livecd/cdtar","livecd/archscript","livecd/runscript"])
46
		file_locate(self.settings, ["livecd/cdtar","livecd/archscript","livecd/runscript"])
47
		if self.settings.has_key("portage_confdir"):
47
		if self.settings.has_key("portage_confdir"):
48
			file_locate(self.settings,["portage_confdir"],expand=0)
48
			file_locate(self.settings,["portage_confdir"],expand=0)
49
			self.mounts.append(self.settings["portage_confdir"])
50
			self.mountmap[self.settings["portage_confdir"]]="/etc/portage"
49
	
51
	
50
	def unpack_and_bind(self):
52
	def unpack_and_bind(self):
51
		if not os.path.exists(self.settings["chroot_path"]):
53
		if not os.path.exists(self.settings["chroot_path"]):
Lines 69-80 Link Here
69
		cmd("ln -sf ../usr/portage/profiles/"+self.settings["target_profile"]+" "
71
		cmd("ln -sf ../usr/portage/profiles/"+self.settings["target_profile"]+" "
70
			+self.settings["chroot_path"]+"/etc/make.profile","Error creating profile link")
72
			+self.settings["chroot_path"]+"/etc/make.profile","Error creating profile link")
71
	
73
	
72
		if self.settings.has_key("portage_confdir"):
73
			print "Configuring /etc/portage..."
74
			cmd("rm -rf "+self.settings["chroot_path"]+"/etc/portage","Error zapping /etc/portage")
75
			cmd("cp -R "+self.settings["portage_confdir"]+" "+self.settings["chroot_path"]+\
76
				"/etc/portage","Error copying /etc/portage")
77
78
		for x in self.mounts: 
74
		for x in self.mounts: 
79
			if not os.path.exists(self.settings["chroot_path"]+x):
75
			if not os.path.exists(self.settings["chroot_path"]+x):
80
				os.makedirs(self.settings["chroot_path"]+x)
76
				os.makedirs(self.settings["chroot_path"]+x)

Return to bug 76146