diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-02-03 12:31:06 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-02-03 12:31:06 +0000 |
commit | d2e17c08a40a16b9c57384a3111b24f5619b0f5a (patch) | |
tree | 07dcf20801562b7cb5b32bab7d5947303afcaa22 /pym/portage.py | |
parent | 18d21a30feb0b7e2b2b9e79465695c66601465d8 (diff) | |
download | portage-d2e17c08a40a16b9c57384a3111b24f5619b0f5a.tar.gz portage-d2e17c08a40a16b9c57384a3111b24f5619b0f5a.tar.bz2 portage-d2e17c08a40a16b9c57384a3111b24f5619b0f5a.zip |
For bug #165065, use the proper RESTRICT setting when fetching files in digestgen(). (trunk r5874:5875)
svn path=/main/branches/2.1.2/; revision=5883
Diffstat (limited to 'pym/portage.py')
-rw-r--r-- | pym/portage.py | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/pym/portage.py b/pym/portage.py index 25c4d7a14..d9b283e94 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -2705,19 +2705,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, |