summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-05-06 07:56:22 +0000
committerZac Medico <zmedico@gentoo.org>2007-05-06 07:56:22 +0000
commit11409be482effecdf57673318a47c045bb1c822b (patch)
treebbdf0c680ee0d6d0f2e118a95c40da2598328a59 /pym
parent2f9b11bcb20606164ab4756ff697443cb0ec871d (diff)
downloadportage-11409be482effecdf57673318a47c045bb1c822b.tar.gz
portage-11409be482effecdf57673318a47c045bb1c822b.tar.bz2
portage-11409be482effecdf57673318a47c045bb1c822b.zip
Use varexpand to expand FETCHCOMMAND and RESUMECOMMAND.
svn path=/main/trunk/; revision=6487
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 5143d7f65..89c0fee58 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -2631,13 +2631,14 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
writemsg_stdout(">>> Downloading '%s'\n" % \
re.sub(r'//(.+):.+@(.+)/',r'//\1:*password*@\2/', loc))
myfetch = locfetch.split()
- variables = {"${DISTDIR}":mysettings["DISTDIR"],
- "${URI}":loc, "${FILE}":myfile}
+ variables = {
+ "DISTDIR": mysettings["DISTDIR"],
+ "URI": loc,
+ "FILE": myfile
+ }
+
for i in xrange(len(myfetch)):
- token = myfetch[i].strip("\"'")
- for var, value in variables.iteritems():
- token = token.replace(var, value)
- myfetch[i] = token
+ myfetch[i] = varexpand(myfetch[i], mydict=variables)
spawn_keywords = {}
if "userfetch" in mysettings.features and \