summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-02-08 10:19:19 +0000
committerZac Medico <zmedico@gentoo.org>2008-02-08 10:19:19 +0000
commit1dc15d881f6be809442ad9970fa3120614abcb16 (patch)
treec739e56a72b05ae7fb83ef1283d777553dfdc0cb
parentFix depgraph.select_files() so that arguments are expanded (diff)
downloadportage-multirepo-1dc15d881f6be809442ad9970fa3120614abcb16.tar.gz
portage-multirepo-1dc15d881f6be809442ad9970fa3120614abcb16.tar.bz2
portage-multirepo-1dc15d881f6be809442ad9970fa3120614abcb16.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. (trunk r9293) svn path=/main/branches/2.1.2/; revision=9296
-rwxr-xr-xbin/emerge32
1 files changed, 31 insertions, 1 deletions
diff --git a/bin/emerge b/bin/emerge
index d93bf908..45507985 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1376,6 +1376,7 @@ class depgraph:
self._slot_collision_nodes = set()
self._altlist_cache = {}
self._pprovided_args = []
+ self._missing_args = []
def _show_slot_collision_notice(self):
"""Show an informational message advising the user to mask one of the
@@ -1659,6 +1660,35 @@ class depgraph:
if arg:
self._set_nodes.add(jbigkey)
+ built = mytype != "ebuild"
+ installed = mytype == "installed"
+ if 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, mykey, metadata,
+ built=built, installed=installed)
+
+ all_ebuilds_masked = bool(
+ portdb.xmatch("match-all", arg) and
+ not portdb.xmatch("bestmatch-visible", arg))
+
+ if installed_masked or all_ebuilds_masked:
+ self._missing_args.append(arg)
+
+ if "selective" not in self.myparams:
+ self._show_unsatisfied_dep(myroot, atom)
+ return 0
# Do this even when addme is False (--onlydeps) so that the
# parent/child relationship is always known in case
@@ -2918,7 +2948,7 @@ class depgraph:
for myatom in mylist:
self._set_atoms.add(myatom)
- missing_atoms = []
+ missing_atoms = self._missing_args
for mydep in mylist:
try:
if not self.select_dep(