From a90530ab29c7db0aadfd341412538e57bab6a1b4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 21 Dec 2007 00:47:16 +0000 Subject: [PATCH] Slightly improved the masked package check inside dep_zapdeps(). svn path=/main/trunk/; revision=9006 --- pym/portage/__init__.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 8f75a319a..c84ea2a28 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -5230,15 +5230,15 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None): if avail_pkg: avail_slot = "%s:%s" % (dep_getkey(atom), mydbapi.aux_get(avail_pkg, ["SLOT"])[0]) - elif not avail_pkg and \ - (use_binaries or not mydbapi.cp_list(dep_getkey(atom))): - # With --usepkgonly, count installed packages as "available". - # Note that --usepkgonly currently has no package.mask support. - # See bug #149816. - avail_pkg = best(vardb.match(atom)) - if avail_pkg: - avail_slot = "%s:%s" % (dep_getkey(atom), - vardb.aux_get(avail_pkg, ["SLOT"])[0]) + elif not avail_pkg: + has_mask = False + if hasattr(mydbapi, "xmatch"): + has_mask = bool(mydbapi.xmatch("bestmatch-all", atom)) + if (use_binaries or not has_mask): + avail_pkg = best(vardb.match(atom)) + if avail_pkg: + avail_slot = "%s:%s" % (dep_getkey(atom), + vardb.aux_get(avail_pkg, ["SLOT"])[0]) if not avail_pkg: all_available = False break -- 2.26.2