View | Details | Raw Unified
Collapse All | Expand All

(-) catalyst-2.0.4.orig/examples/generic_stage_template.spec (+8 lines)
 Lines 105-107    Link Here 
# example:
# example:
# ldflags: -Wl,-O1 -Wl,-z,now
# ldflags: -Wl,-O1 -Wl,-z,now
ldflags:
ldflags:
# Extra bind mounts to be created within the chroot. Not used for releases;
# don't touch this unless you've extremely sure you know what you're doing.
# Syntax: [chroot_path]:[target_path]
# If the two values match, the latter may be left out.
# example:
# extra_mounts: /afs
extra_mounts:
(-) catalyst-2.0.4.orig/modules/catalyst_support.py (-6 / +11 lines)
 Lines 1-5    Link Here 
import sys,string,os,types,re,signal,traceback,time
import portage_util,sys,string,os,types,re,signal,traceback,time
#import md5,sha
#import md5,sha
selinux_capable = False
selinux_capable = False
#userpriv_capable = (os.getuid() == 0)
#userpriv_capable = (os.getuid() == 0)
 Lines 612-617    Link Here 
		else:
		else:
			myline=mylines[pos]
			myline=mylines[pos]
			mobj=pat.match(myline)
			mobj=pat.match(myline)
			if mobj == None:
				source_match = re.match('source\s+(.*)$', myline)
				if source_match:
					mymakeconf.update(parse_makeconf(open(source_match.group(1).strip(), 'r').readlines()))
				else:
					print '>> Parse error; dumping make.conf'
					for line in mylines: sys.stdout.write('  ' + line)
					raise Exception('Unparsable line %r' % myline)
			pos += 1
			pos += 1
			if mobj.group(2):
			if mobj.group(2):
			    clean_string = re.sub(r"\"",r"",mobj.group(2))
			    clean_string = re.sub(r"\"",r"",mobj.group(2))
 Lines 630-641    Link Here 
def read_makeconf(mymakeconffile):
def read_makeconf(mymakeconffile):
	if os.path.exists(mymakeconffile):
	if os.path.exists(mymakeconffile):
	    try:
	    try:
		    myf=open(mymakeconffile,"r")
		return portage_util.getconfig(mymakeconffile, allow_sourcing=True)
		    mylines=myf.readlines()
		    myf.close()
		    return parse_makeconf(mylines)
	    except:
	    except:
		    raise CatalystError, "Could not open make.conf file "+mymakeconffile
		raise CatalystError, "Could not open make.conf file "+mymakeconffile
	else:
	else:
	    makeconf={}
	    makeconf={}
	    return makeconf
	    return makeconf
(-) catalyst-2.0.4.orig/modules/generic_stage_target.py (-3 / +16 lines)
 Lines 18-24    Link Here 
		self.valid_values.extend(["version_stamp","target","subarch",\
		self.valid_values.extend(["version_stamp","target","subarch",\
			"rel_type","profile","snapshot","source_subpath","portage_confdir",\
			"rel_type","profile","snapshot","source_subpath","portage_confdir",\
			"cflags","cxxflags","ldflags","cbuild","chost","hostuse","portage_overlay",\
			"cflags","cxxflags","ldflags","cbuild","chost","hostuse","portage_overlay",\
			"distcc_hosts","makeopts","pkgcache_path","kerncache_path"])
			"distcc_hosts","makeopts","pkgcache_path","kerncache_path","extra_mounts"])
		
		
		self.set_valid_build_kernel_vars(addlargs)
		self.set_valid_build_kernel_vars(addlargs)
		generic_target.__init__(self,myspec,addlargs)
		generic_target.__init__(self,myspec,addlargs)
 Lines 198-203    Link Here 
			self.mounts.append("/tmp/kerncache")
			self.mounts.append("/tmp/kerncache")
			self.mountmap["/tmp/kerncache"]=self.settings["kerncache_path"]
			self.mountmap["/tmp/kerncache"]=self.settings["kerncache_path"]
		if self.settings.has_key("extra_mounts"):
			for extra_mount in self.settings["extra_mounts"].split():
				if ':' in extra_mount:
					extra_mount_source, extra_mount_target = extra_mount.split(':', 1)
				else:
					extra_mount_source = extra_mount_target = extra_mount
				self.mounts.append(extra_mount_target)
				self.mountmap[extra_mount_target] = extra_mount_source
		if self.settings.has_key("CCACHE"):
		if self.settings.has_key("CCACHE"):
			if os.environ.has_key("CCACHE_DIR"):
			if os.environ.has_key("CCACHE_DIR"):
				ccdir=os.environ["CCACHE_DIR"]
				ccdir=os.environ["CCACHE_DIR"]
 Lines 736-743    Link Here 
			print "Configuring profile link..."
			print "Configuring profile link..."
			cmd("rm -f "+self.settings["chroot_path"]+"/etc/make.profile",\
			cmd("rm -f "+self.settings["chroot_path"]+"/etc/make.profile",\
					"Error zapping profile link",env=self.env)
					"Error zapping profile link",env=self.env)
	    		cmd("ln -sf ../usr/portage/profiles/"+self.settings["target_profile"]+\
			if self.settings['target_profile'][0] == '/':
		    		" "+self.settings["chroot_path"]+"/etc/make.profile","Error creating profile link",env=self.env)
				symlink_target = self.settings["target_profile"]
			else:
				symlink_target = "../usr/portage/profiles/"+self.settings["target_profile"]
	    		cmd("ln -sf " + symlink_target + " " + \
		    		self.settings["chroot_path"]+"/etc/make.profile","Error creating profile link",env=self.env)
		    	touch(self.settings["autoresume_path"]+"config_profile_link")
		    	touch(self.settings["autoresume_path"]+"config_profile_link")
				       
				       
	def setup_confdir(self):	
	def setup_confdir(self):