summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/EbuildFetchonly.py3
-rw-r--r--pym/_emerge/Package.py4
-rw-r--r--pym/_emerge/depgraph.py14
3 files changed, 7 insertions, 14 deletions
diff --git a/pym/_emerge/EbuildFetchonly.py b/pym/_emerge/EbuildFetchonly.py
index 1a8eb6e8d..82e11065a 100644
--- a/pym/_emerge/EbuildFetchonly.py
+++ b/pym/_emerge/EbuildFetchonly.py
@@ -24,9 +24,8 @@ class EbuildFetchonly(SlotObject):
ebuild_path = portdb.findname(pkg.cpv)
settings.setcpv(pkg)
debug = settings.get("PORTAGE_DEBUG") == "1"
- restrict_fetch = 'fetch' in settings['PORTAGE_RESTRICT'].split()
- if restrict_fetch:
+ if 'fetch' in pkg.metadata.restrict:
rval = self._execute_with_builddir()
else:
rval = portage.doebuild(ebuild_path, "fetch",
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index 6763f8e16..1b8a90c8b 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -241,3 +241,7 @@ class _PackageMetadataWrapper(_PackageMetadataWrapperBase):
@property
def properties(self):
return self['PROPERTIES'].split()
+
+ @property
+ def restrict(self):
+ return self['RESTRICT'].split()
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 2d9c50405..9e5ddac28 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -3709,18 +3709,8 @@ class depgraph(object):
else:
repo_path_real = portdb.getRepositoryPath(repo_name)
pkg_use = list(pkg.use.enabled)
- try:
- restrict = flatten(use_reduce(paren_reduce(
- pkg.metadata["RESTRICT"]), uselist=pkg_use))
- except portage.exception.InvalidDependString, e:
- if not pkg.installed:
- show_invalid_depstring_notice(x,
- pkg.metadata["RESTRICT"], str(e))
- del e
- return 1
- restrict = []
- if "ebuild" == pkg_type and x[3] != "nomerge" and \
- "fetch" in restrict:
+ if not pkg.built and pkg.operation == 'merge' and \
+ 'fetch' in pkg.metadata.restrict:
fetch = red("F")
if ordered:
counters.restrict_fetch += 1