Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 131229 Details for
Bug 131504
Insufficent parsing of make.conf by parse_makeconf function.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
catalyst-misc_enhancements.patch
catalyst-misc_enhancements.patch (text/plain), 4.39 KB, created by
Chris Gianelloni (RETIRED)
on 2007-09-18 18:28:08 UTC
(
hide
)
Description:
catalyst-misc_enhancements.patch
Filename:
MIME Type:
Creator:
Chris Gianelloni (RETIRED)
Created:
2007-09-18 18:28:08 UTC
Size:
4.39 KB
patch
obsolete
>diff -ru catalyst-2.0.4.orig/examples/generic_stage_template.spec catalyst-2.0.4/examples/generic_stage_template.spec >--- catalyst-2.0.4.orig/examples/generic_stage_template.spec 2007-04-12 07:00:25.000000000 -0500 >+++ catalyst-2.0.4/examples/generic_stage_template.spec 2007-06-11 09:32:09.000000000 -0500 >@@ -105,3 +105,11 @@ > # example: > # ldflags: -Wl,-O1 -Wl,-z,now > 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: >Only in catalyst-2.0.4/examples: generic_stage_template.spec~ >diff -ru catalyst-2.0.4.orig/modules/catalyst_support.py catalyst-2.0.4/modules/catalyst_support.py >--- catalyst-2.0.4.orig/modules/catalyst_support.py 2007-04-12 07:00:25.000000000 -0500 >+++ catalyst-2.0.4/modules/catalyst_support.py 2007-06-11 09:26:40.000000000 -0500 >@@ -1,5 +1,5 @@ > >-import sys,string,os,types,re,signal,traceback,time >+import portage_util,sys,string,os,types,re,signal,traceback,time > #import md5,sha > selinux_capable = False > #userpriv_capable = (os.getuid() == 0) >@@ -612,6 +612,14 @@ > else: > myline=mylines[pos] > 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 > if mobj.group(2): > clean_string = re.sub(r"\"",r"",mobj.group(2)) >@@ -630,12 +638,9 @@ > def read_makeconf(mymakeconffile): > if os.path.exists(mymakeconffile): > try: >- myf=open(mymakeconffile,"r") >- mylines=myf.readlines() >- myf.close() >- return parse_makeconf(mylines) >+ return portage_util.getconfig(mymakeconffile, allow_sourcing=True) > except: >- raise CatalystError, "Could not open make.conf file "+mymakeconffile >+ raise CatalystError, "Could not open make.conf file "+mymakeconffile > else: > makeconf={} > return makeconf >diff -ru catalyst-2.0.4.orig/modules/generic_stage_target.py catalyst-2.0.4/modules/generic_stage_target.py >--- catalyst-2.0.4.orig/modules/generic_stage_target.py 2007-06-08 16:35:29.000000000 -0500 >+++ catalyst-2.0.4/modules/generic_stage_target.py 2007-06-11 09:26:40.000000000 -0500 >@@ -18,7 +18,7 @@ > self.valid_values.extend(["version_stamp","target","subarch",\ > "rel_type","profile","snapshot","source_subpath","portage_confdir",\ > "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) > generic_target.__init__(self,myspec,addlargs) >@@ -198,6 +198,15 @@ > self.mounts.append("/tmp/kerncache") > 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 os.environ.has_key("CCACHE_DIR"): > ccdir=os.environ["CCACHE_DIR"] >@@ -736,8 +745,12 @@ > print "Configuring profile link..." > cmd("rm -f "+self.settings["chroot_path"]+"/etc/make.profile",\ > "Error zapping profile link",env=self.env) >- cmd("ln -sf ../usr/portage/profiles/"+self.settings["target_profile"]+\ >- " "+self.settings["chroot_path"]+"/etc/make.profile","Error creating profile link",env=self.env) >+ if self.settings['target_profile'][0] == '/': >+ 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") > > def setup_confdir(self):
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 131504
: 131229 |
131900