* [gentoo-portage-dev] [PATCH] repoman: suppress dependency.badmasked triggered by use.force and use.mask
@ 2015-10-05 0:35 Zac Medico
2015-10-05 0:58 ` Brian Dolbec
0 siblings, 1 reply; 2+ messages in thread
From: Zac Medico @ 2015-10-05 0:35 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Zac Medico
Add 'minimum-all-ignore-profile' mode to portbapi.xmatch, and use
it to ignore interactions between USE deps, use.force, and use.mask.
---
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"
--
2.4.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] repoman: suppress dependency.badmasked triggered by use.force and use.mask
2015-10-05 0:35 [gentoo-portage-dev] [PATCH] repoman: suppress dependency.badmasked triggered by use.force and use.mask Zac Medico
@ 2015-10-05 0:58 ` Brian Dolbec
0 siblings, 0 replies; 2+ messages in thread
From: Brian Dolbec @ 2015-10-05 0:58 UTC (permalink / raw
To: gentoo-portage-dev
On Sun, 4 Oct 2015 17:35:14 -0700
Zac Medico <zmedico@gentoo.org> wrote:
> Add 'minimum-all-ignore-profile' mode to portbapi.xmatch, and use
> it to ignore interactions between USE deps, use.force, and use.mask.
> ---
> pym/portage/dbapi/__init__.py | 23 ++++++++++++-----------
> pym/portage/dbapi/porttree.py | 18 +++++++++++-------
> pym/repoman/scanner.py | 2 +-
> 3 files changed, 24 insertions(+), 19 deletions(-)
>
>
Looks good, merge please
--
Brian Dolbec <dolsen>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-05 0:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-05 0:35 [gentoo-portage-dev] [PATCH] repoman: suppress dependency.badmasked triggered by use.force and use.mask Zac Medico
2015-10-05 0:58 ` Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox