* [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/, pym/repoman/
@ 2015-10-05 1:13 Zac Medico
0 siblings, 0 replies; only message in thread
From: Zac Medico @ 2015-10-05 1:13 UTC (permalink / raw
To: gentoo-commits
commit: ce16f6c001a867e3a311dcd7712223cf5387424c
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 5 00:23:01 2015 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Oct 5 01:04:30 2015 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ce16f6c0
repoman: suppress dependency.badmasked triggered by use.force and use.mask
Add 'minimum-all-ignore-profile' mode to portbapi.xmatch, and use
it to ignore interactions between USE deps, use.force, and use.mask.
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>
pym/portage/dbapi/__init__.py | 23 ++++++++++++-----------
pym/portage/dbapi/porttree.py | 18 +++++++++++-------
pym/repoman/scanner.py | 2 +-
3 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py
index b6745fa..9505384 100644
--- a/pym/portage/dbapi/__init__.py
+++ b/pym/portage/dbapi/__init__.py
@@ -215,7 +215,7 @@ class dbapi(object):
yield cpv
- def _match_use(self, atom, pkg, metadata):
+ def _match_use(self, atom, pkg, metadata, ignore_profile=False):
eapi_attrs = _get_eapi_attrs(metadata["EAPI"])
if eapi_attrs.iuse_effective:
iuse_implicit_match = self.settings._iuse_effective_match
@@ -261,17 +261,18 @@ class dbapi(object):
return False
elif not self.settings.local_config:
- # Check masked and forced flags for repoman.
- usemask = self.settings._getUseMask(pkg,
- stable=self.settings._parent_stable)
- if any(x in usemask for x in atom.use.enabled):
- return False
+ if not ignore_profile:
+ # Check masked and forced flags for repoman.
+ usemask = self.settings._getUseMask(pkg,
+ stable=self.settings._parent_stable)
+ if any(x in usemask for x in atom.use.enabled):
+ return False
- useforce = self.settings._getUseForce(pkg,
- stable=self.settings._parent_stable)
- if any(x in useforce and x not in usemask
- for x in atom.use.disabled):
- return False
+ useforce = self.settings._getUseForce(pkg,
+ stable=self.settings._parent_stable)
+ if any(x in useforce and x not in usemask
+ for x in atom.use.disabled):
+ return False
# Check unsatisfied use-default deps
if atom.use.enabled:
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index d13fdee..a954de5 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -809,9 +809,9 @@ class portdbapi(dbapi):
return mylist
def freeze(self):
- for x in "bestmatch-visible", "cp-list", "match-all", \
- "match-all-cpv-only", "match-visible", "minimum-all", \
- "minimum-visible":
+ for x in ("bestmatch-visible", "cp-list", "match-all",
+ "match-all-cpv-only", "match-visible", "minimum-all",
+ "minimum-all-ignore-profile", "minimum-visible"):
self.xcache[x]={}
self.frozen=1
@@ -870,8 +870,9 @@ class portdbapi(dbapi):
myval = match_from_list(mydep,
self.cp_list(mykey, mytree=mytree))
- elif level in ("bestmatch-visible", "match-all", "match-visible",
- "minimum-all", "minimum-visible"):
+ elif level in ("bestmatch-visible", "match-all",
+ "match-visible", "minimum-all", "minimum-all-ignore-profile",
+ "minimum-visible"):
# Find the minimum matching visible version. This is optimized to
# minimize the number of metadata accesses (improves performance
# especially in cases where metadata needs to be generated).
@@ -881,7 +882,9 @@ class portdbapi(dbapi):
mylist = match_from_list(mydep,
self.cp_list(mykey, mytree=mytree))
- visibility_filter = level not in ("match-all", "minimum-all")
+ ignore_profile = level in ("minimum-all-ignore-profile",)
+ visibility_filter = level not in ("match-all",
+ "minimum-all", "minimum-all-ignore-profile")
single_match = level not in ("match-all", "match-visible")
myval = []
aux_keys = list(self._aux_cache_keys)
@@ -922,7 +925,8 @@ class portdbapi(dbapi):
continue
if mydep.unevaluated_atom.use is not None and \
- not self._match_use(mydep, pkg_str, metadata):
+ not self._match_use(mydep, pkg_str, metadata,
+ ignore_profile=ignore_profile):
continue
myval.append(pkg_str)
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index ff32ac8..0194017 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -633,7 +633,7 @@ class Scanner(object):
continue
# we are testing deps for a masked package; give it some lee-way
suffix = "masked"
- matchmode = "minimum-all"
+ matchmode = "minimum-all-ignore-profile"
else:
suffix = ""
matchmode = "minimum-visible"
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-05 1:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-05 1:13 [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/, pym/repoman/ Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox