summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-02-03 00:26:42 +0000
committerZac Medico <zmedico@gentoo.org>2007-02-03 00:26:42 +0000
commit837b9ef9fa27ac6793e4deb169f452317f013dae (patch)
tree244b3a2b9f6a9e823d7febd0b1f01c80ea6c98d3
parentf12a9d873abf43f4e28cb9a8ee80021769db19e5 (diff)
downloadportage-837b9ef9fa27ac6793e4deb169f452317f013dae.tar.gz
portage-837b9ef9fa27ac6793e4deb169f452317f013dae.tar.bz2
portage-837b9ef9fa27ac6793e4deb169f452317f013dae.zip
For bug #165065, use the proper RESTRICT setting when fetching files in digestgen().
svn path=/main/trunk/; revision=5875
-rw-r--r--pym/portage/__init__.py28
1 files changed, 19 insertions, 9 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index bfdf79b0d..43649ab45 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -2731,19 +2731,29 @@ def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0, myportdb=None
if missing_files:
mytree = os.path.realpath(os.path.dirname(
os.path.dirname(mysettings["O"])))
- myuris = []
+ fetch_settings = config(clone=mysettings)
+ debug = mysettings.get("PORTAGE_DEBUG") == "1"
for myfile in missing_files:
+ success = False
for cpv in distfiles_map[myfile]:
+ myebuild = os.path.join(mysettings["O"],
+ catsplit(cpv)[1] + ".ebuild")
+ # for RESTRICT=fetch, mirror, etc...
+ doebuild_environment(myebuild, "fetch",
+ mysettings["ROOT"], fetch_settings,
+ debug, 1, myportdb)
alluris, aalist = myportdb.getfetchlist(
cpv, mytree=mytree, all=True,
- mysettings=mysettings)
- for uri in alluris:
- if os.path.basename(uri) == myfile:
- myuris.append(uri)
- if not fetch(myuris, mysettings):
- writemsg(("!!! File %s doesn't exist, can't update " + \
- "Manifest\n") % myfile, noiselevel=-1)
- return 0
+ mysettings=fetch_settings)
+ myuris = [uri for uri in alluris \
+ if os.path.basename(uri) == myfile]
+ if fetch(myuris, fetch_settings):
+ success = True
+ break
+ if not success:
+ writemsg(("!!! File %s doesn't exist, can't update " + \
+ "Manifest\n") % myfile, noiselevel=-1)
+ return 0
writemsg_stdout(">>> Creating Manifest for %s\n" % mysettings["O"])
try:
mf.create(requiredDistfiles=myarchives,