diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-11 12:48:44 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-11 12:48:44 -0700 |
commit | fd3f18634c4039d73d72554e0c8bb2817ccf753e (patch) | |
tree | 51459449d21f61f5c1f2998688affdb8ac4bc058 | |
parent | 5aa9e5b5c55c9f1980d0fb4286c6b7787e99d3df (diff) | |
download | portage-fd3f18634c4039d73d72554e0c8bb2817ccf753e.tar.gz portage-fd3f18634c4039d73d72554e0c8bb2817ccf753e.tar.bz2 portage-fd3f18634c4039d73d72554e0c8bb2817ccf753e.zip |
When fetching distfiles inside digestgen(), ignore conditional partsv2.2_rc80
of RESTRICT since they don't apply unconditionally. Assume such
conditionals only apply on the client side where digestgen() does not
need to be called.
-rw-r--r-- | pym/portage/package/ebuild/digestgen.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pym/portage/package/ebuild/digestgen.py b/pym/portage/package/ebuild/digestgen.py index d6ac6fd70..9408b1456 100644 --- a/pym/portage/package/ebuild/digestgen.py +++ b/pym/portage/package/ebuild/digestgen.py @@ -13,6 +13,7 @@ portage.proxy.lazyimport.lazyimport(globals(), from portage import os from portage.const import MANIFEST2_REQUIRED_HASH from portage.dbapi.porttree import FetchlistDict +from portage.dep import use_reduce from portage.exception import InvalidDependString, FileNotFound, \ PermissionDenied, PortagePackageException from portage.localization import _ @@ -108,9 +109,15 @@ def digestgen(myarchives=None, mysettings=None, myportdb=None): for cpv in distfiles_map[myfile]: uris.update(myportdb.getFetchMap( cpv, mytree=mytree)[myfile]) - restrict_fetch = 'fetch' in \ - myportdb.aux_get(cpv, ['RESTRICT'], - mytree=mytree)[0].split() + restrict = myportdb.aux_get(cpv, ['RESTRICT'], + mytree=mytree)[0] + # Here we ignore conditional parts of RESTRICT since + # they don't apply unconditionally. Assume such + # conditionals only apply on the client side where + # digestgen() does not need to be called. + restrict = use_reduce(restrict, + flat=True, matchnone=True) + restrict_fetch = 'fetch' in restrict try: st = os.stat(os.path.join( |