summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-02-08 08:39:58 +0000
committerZac Medico <zmedico@gentoo.org>2008-02-08 08:39:58 +0000
commitdcf5a088ddfa777fdd279213cb90252515e46a35 (patch)
treece03f8fe0074dd7b448faae068c1c6fab013b976 /pym
parent5ee8ee2b9a0739a7d5b15fda94593eecdab91103 (diff)
downloadportage-dcf5a088ddfa777fdd279213cb90252515e46a35.tar.gz
portage-dcf5a088ddfa777fdd279213cb90252515e46a35.tar.bz2
portage-dcf5a088ddfa777fdd279213cb90252515e46a35.zip
Bug #208708 - Fix masked package display some more:
- Warn if all matching ebuilds are masked or the installed package itself is masked. - Do not warn if there are simply no matching ebuilds since that would be annoying in some cases. svn path=/main/trunk/; revision=9293
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/__init__.py32
1 files changed, 29 insertions, 3 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 12922636a..5be88735d 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -2082,15 +2082,41 @@ class depgraph(object):
continue
pkg, existing_node = self._select_package(
myroot, atom, onlydeps=onlydeps)
- if not pkg or \
- (pkg.installed and portdb.xmatch("match-all", atom) \
- and not portdb.xmatch("bestmatch-visible", atom)):
+ if not pkg:
if not (isinstance(arg, SetArg) and \
arg.name in ("system", "world")):
self._show_unsatisfied_dep(myroot, atom)
return 0, myfavorites
self._missing_args.append((arg, atom))
continue
+ if pkg.installed:
+ # Warn if all matching ebuilds are masked or
+ # the installed package itself is masked. Do
+ # not warn if there are simply no matching
+ # ebuilds since that would be annoying in some
+ # cases:
+ #
+ # - binary packages installed from an overlay
+ # that is not listed in PORTDIR_OVERLAY
+ #
+ # - multi-slot atoms listed in the world file
+ # to prevent depclean from removing them
+
+ installed_masked = not visible(
+ pkgsettings, pkg.cpv, pkg.metadata,
+ built=pkg.built, installed=pkg.installed)
+
+ all_ebuilds_masked = bool(
+ portdb.xmatch("match-all", atom) and
+ not portdb.xmatch("bestmatch-visible", atom))
+
+ if installed_masked or all_ebuilds_masked:
+ self._missing_args.append((arg, atom))
+
+ if "selective" not in self.myparams:
+ self._show_unsatisfied_dep(myroot, atom)
+ return 0, myfavorites
+
self._dep_stack.append(
Dependency(atom=atom, root=myroot, parent=arg))
if not self._create_graph():