Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 98903 Details for
Bug 14215
portage can't handle embedded quotes in env.d/* files
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
don't try to expand variables in env.d values
expand.patch (text/plain), 1.82 KB, created by
Zac Medico
on 2006-10-05 20:40:54 UTC
(
hide
)
Description:
don't try to expand variables in env.d values
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2006-10-05 20:40:54 UTC
Size:
1.82 KB
patch
obsolete
>Index: pym/portage_util.py >=================================================================== >--- pym/portage_util.py (revision 4602) >+++ pym/portage_util.py (revision 4603) >@@ -226,7 +226,7 @@ > return 0 > return 1 > >-def getconfig(mycfg,tolerant=0,allow_sourcing=False): >+def getconfig(mycfg, tolerant=0, allow_sourcing=False, expand=True): > mykeys={} > try: > f=open(mycfg,'r') >@@ -276,7 +276,10 @@ > raise portage_exception.CorruptionError("ParseError: Unexpected EOF: "+str(mycfg)+": line "+str(lex.lineno)) > else: > return mykeys >- mykeys[key]=varexpand(val,mykeys) >+ if expand: >+ mykeys[key] = varexpand(val, mykeys) >+ else: >+ mykeys[key] = val > except SystemExit, e: > raise > except Exception, e: >Index: pym/portage.py >=================================================================== >--- pym/portage.py (revision 4602) >+++ pym/portage.py (revision 4603) >@@ -570,7 +570,7 @@ > for x in fns: > file_path = os.path.join(envd_dir, x) > try: >- myconfig = getconfig(file_path) >+ myconfig = getconfig(file_path, expand=False) > except portage_exception.ParseError, e: > writemsg("!!! '%s'\n" % str(e), noiselevel=-1) > del e >@@ -1127,7 +1127,7 @@ > del blacklisted, cfg > > env_d = getconfig( >- os.path.join(target_root, "etc", "profile.env")) >+ os.path.join(target_root, "etc", "profile.env"), expand=False) > # env_d will be None if profile.env doesn't exist. > if env_d: > self.configdict["env.d"].update(env_d) >@@ -1530,7 +1530,7 @@ > # We grab the latest profile.env here since it changes frequently. > self.configdict["env.d"].clear() > env_d = getconfig( >- os.path.join(self["ROOT"], "etc", "profile.env")) >+ os.path.join(self["ROOT"], "etc", "profile.env"), expand=False) > if env_d: > # env_d will be None if profile.env doesn't exist. > self.configdict["env.d"].update(env_d)
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 14215
:
8767
|
98900
| 98903