diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-07-10 18:29:22 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-07-10 18:29:22 +0000 |
commit | e121bc5c499d8be0447d2a3f38cc7f5fd5891079 (patch) | |
tree | 3387391437f29a3f93c2b71530c047b2198e384d /pym/portage.py | |
parent | acf6947f80b6c84ad1fc258ba5db5df2cf6d0b30 (diff) | |
download | portage-e121bc5c499d8be0447d2a3f38cc7f5fd5891079.tar.gz portage-e121bc5c499d8be0447d2a3f38cc7f5fd5891079.tar.bz2 portage-e121bc5c499d8be0447d2a3f38cc7f5fd5891079.zip |
For bug #184604, make env-update write $ in front of quoted values when appropriate. (trunk r7216)
svn path=/main/branches/2.1.2/; revision=7217
Diffstat (limited to 'pym/portage.py')
-rw-r--r-- | pym/portage.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py index 57d58e5b8..7127a1c7f 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -811,8 +811,12 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None, env_keys = [ x for x in env if x != "LDPATH" ] env_keys.sort() - for x in env_keys: - outfile.write("export %s='%s'\n" % (x, env[x])) + for k in env_keys: + v = env[k] + if v.startswith('$') and not v.startswith('${'): + outfile.write("export %s=$'%s'\n" % (k, v[1:])) + else: + outfile.write("export %s='%s'\n" % (k, v)) outfile.close() #create /etc/csh.env for (t)csh support |