summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-10 21:23:56 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-10 21:23:56 -0700
commitc32e67495dfcb38d30e418e5a81665a52c924f8b (patch)
tree7488029c2ddf1f9a3e6a6bc364d25aadbc1e20e7
parentbafa57f5be5f5bd52162023bca36bc8424b2ada3 (diff)
downloadportage-c32e67495dfcb38d30e418e5a81665a52c924f8b.tar.gz
portage-c32e67495dfcb38d30e418e5a81665a52c924f8b.tar.bz2
portage-c32e67495dfcb38d30e418e5a81665a52c924f8b.zip
Make digestgen() use spawn_nofetch() when necessary, since fetch()
no longer does it.
-rw-r--r--pym/portage/package/ebuild/digestgen.py19
1 files changed, 6 insertions, 13 deletions
diff --git a/pym/portage/package/ebuild/digestgen.py b/pym/portage/package/ebuild/digestgen.py
index ac64467d9..d5cb2b829 100644
--- a/pym/portage/package/ebuild/digestgen.py
+++ b/pym/portage/package/ebuild/digestgen.py
@@ -7,7 +7,7 @@ import errno
import portage
portage.proxy.lazyimport.lazyimport(globals(),
- 'portage.package.ebuild.doebuild:doebuild_environment',
+ 'portage.package.ebuild._spawn_nofetch:spawn_nofetch',
)
from portage import os
@@ -18,7 +18,6 @@ from portage.exception import InvalidDependString, FileNotFound, \
from portage.localization import _
from portage.manifest import Manifest
from portage.output import colorize
-from portage.package.ebuild.config import config
from portage.package.ebuild.fetch import fetch
from portage.util import writemsg, writemsg_stdout
from portage.versions import catsplit
@@ -104,29 +103,23 @@ def digestgen(myarchives=None, mysettings=None, myportdb=None):
if missing_files:
mytree = os.path.realpath(os.path.dirname(
os.path.dirname(mysettings["O"])))
- fetch_settings = config(clone=mysettings)
- debug = mysettings.get("PORTAGE_DEBUG") == "1"
for myfile in missing_files:
uris = set()
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)
uris.update(myportdb.getFetchMap(
cpv, mytree=mytree)[myfile])
- fetch_settings["A"] = myfile # for use by pkg_nofetch()
-
try:
st = os.stat(os.path.join(
mysettings["DISTDIR"],myfile))
except OSError:
st = None
- if not fetch({myfile : uris}, fetch_settings):
+ if not fetch({myfile : uris}, mysettings):
+ myebuild = os.path.join(mysettings["O"],
+ catsplit(cpv)[1] + ".ebuild")
+ spawn_nofetch(myportdb, myebuild,
+ settings=mysettings)
writemsg(_("!!! Fetch failed for %s, can't update "
"Manifest\n") % myfile, noiselevel=-1)
if myfile in dist_hashes and \