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

Collapse All | Expand All

(-)catalyst-2.0.4.orig/examples/generic_stage_template.spec (+8 lines)
Lines 105-107 Link Here
105
# example:
105
# example:
106
# ldflags: -Wl,-O1 -Wl,-z,now
106
# ldflags: -Wl,-O1 -Wl,-z,now
107
ldflags:
107
ldflags:
108
109
# Extra bind mounts to be created within the chroot. Not used for releases;
110
# don't touch this unless you've extremely sure you know what you're doing.
111
# Syntax: [chroot_path]:[target_path]
112
# If the two values match, the latter may be left out.
113
# example:
114
# extra_mounts: /afs
115
extra_mounts:
(-)catalyst-2.0.4.orig/modules/catalyst_support.py (-6 / +11 lines)
Lines 1-5 Link Here
1
1
2
import sys,string,os,types,re,signal,traceback,time
2
import portage_util,sys,string,os,types,re,signal,traceback,time
3
#import md5,sha
3
#import md5,sha
4
selinux_capable = False
4
selinux_capable = False
5
#userpriv_capable = (os.getuid() == 0)
5
#userpriv_capable = (os.getuid() == 0)
Lines 612-617 Link Here
612
		else:
612
		else:
613
			myline=mylines[pos]
613
			myline=mylines[pos]
614
			mobj=pat.match(myline)
614
			mobj=pat.match(myline)
615
			if mobj == None:
616
				source_match = re.match('source\s+(.*)$', myline)
617
				if source_match:
618
					mymakeconf.update(parse_makeconf(open(source_match.group(1).strip(), 'r').readlines()))
619
				else:
620
					print '>> Parse error; dumping make.conf'
621
					for line in mylines: sys.stdout.write('  ' + line)
622
					raise Exception('Unparsable line %r' % myline)
615
			pos += 1
623
			pos += 1
616
			if mobj.group(2):
624
			if mobj.group(2):
617
			    clean_string = re.sub(r"\"",r"",mobj.group(2))
625
			    clean_string = re.sub(r"\"",r"",mobj.group(2))
Lines 630-641 Link Here
630
def read_makeconf(mymakeconffile):
638
def read_makeconf(mymakeconffile):
631
	if os.path.exists(mymakeconffile):
639
	if os.path.exists(mymakeconffile):
632
	    try:
640
	    try:
633
		    myf=open(mymakeconffile,"r")
641
		return portage_util.getconfig(mymakeconffile, allow_sourcing=True)
634
		    mylines=myf.readlines()
635
		    myf.close()
636
		    return parse_makeconf(mylines)
637
	    except:
642
	    except:
638
		    raise CatalystError, "Could not open make.conf file "+mymakeconffile
643
		raise CatalystError, "Could not open make.conf file "+mymakeconffile
639
	else:
644
	else:
640
	    makeconf={}
645
	    makeconf={}
641
	    return makeconf
646
	    return makeconf
(-)catalyst-2.0.4.orig/modules/generic_stage_target.py (-3 / +16 lines)
Lines 18-24 Link Here
18
		self.valid_values.extend(["version_stamp","target","subarch",\
18
		self.valid_values.extend(["version_stamp","target","subarch",\
19
			"rel_type","profile","snapshot","source_subpath","portage_confdir",\
19
			"rel_type","profile","snapshot","source_subpath","portage_confdir",\
20
			"cflags","cxxflags","ldflags","cbuild","chost","hostuse","portage_overlay",\
20
			"cflags","cxxflags","ldflags","cbuild","chost","hostuse","portage_overlay",\
21
			"distcc_hosts","makeopts","pkgcache_path","kerncache_path"])
21
			"distcc_hosts","makeopts","pkgcache_path","kerncache_path","extra_mounts"])
22
		
22
		
23
		self.set_valid_build_kernel_vars(addlargs)
23
		self.set_valid_build_kernel_vars(addlargs)
24
		generic_target.__init__(self,myspec,addlargs)
24
		generic_target.__init__(self,myspec,addlargs)
Lines 198-203 Link Here
198
			self.mounts.append("/tmp/kerncache")
198
			self.mounts.append("/tmp/kerncache")
199
			self.mountmap["/tmp/kerncache"]=self.settings["kerncache_path"]
199
			self.mountmap["/tmp/kerncache"]=self.settings["kerncache_path"]
200
200
201
		if self.settings.has_key("extra_mounts"):
202
			for extra_mount in self.settings["extra_mounts"].split():
203
				if ':' in extra_mount:
204
					extra_mount_source, extra_mount_target = extra_mount.split(':', 1)
205
				else:
206
					extra_mount_source = extra_mount_target = extra_mount
207
				self.mounts.append(extra_mount_target)
208
				self.mountmap[extra_mount_target] = extra_mount_source
209
201
		if self.settings.has_key("CCACHE"):
210
		if self.settings.has_key("CCACHE"):
202
			if os.environ.has_key("CCACHE_DIR"):
211
			if os.environ.has_key("CCACHE_DIR"):
203
				ccdir=os.environ["CCACHE_DIR"]
212
				ccdir=os.environ["CCACHE_DIR"]
Lines 736-743 Link Here
736
			print "Configuring profile link..."
745
			print "Configuring profile link..."
737
			cmd("rm -f "+self.settings["chroot_path"]+"/etc/make.profile",\
746
			cmd("rm -f "+self.settings["chroot_path"]+"/etc/make.profile",\
738
					"Error zapping profile link",env=self.env)
747
					"Error zapping profile link",env=self.env)
739
	    		cmd("ln -sf ../usr/portage/profiles/"+self.settings["target_profile"]+\
748
			if self.settings['target_profile'][0] == '/':
740
		    		" "+self.settings["chroot_path"]+"/etc/make.profile","Error creating profile link",env=self.env)
749
				symlink_target = self.settings["target_profile"]
750
			else:
751
				symlink_target = "../usr/portage/profiles/"+self.settings["target_profile"]
752
	    		cmd("ln -sf " + symlink_target + " " + \
753
		    		self.settings["chroot_path"]+"/etc/make.profile","Error creating profile link",env=self.env)
741
		    	touch(self.settings["autoresume_path"]+"config_profile_link")
754
		    	touch(self.settings["autoresume_path"]+"config_profile_link")
742
				       
755
				       
743
	def setup_confdir(self):	
756
	def setup_confdir(self):	

Return to bug 131504