1 |
Author: zmedico |
2 |
Date: 2008-02-08 08:39:58 +0000 (Fri, 08 Feb 2008) |
3 |
New Revision: 9293 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/_emerge/__init__.py |
7 |
Log: |
8 |
Bug #208708 - Fix masked package display some more: |
9 |
|
10 |
- Warn if all matching ebuilds are masked or the installed |
11 |
package itself is masked. |
12 |
|
13 |
- Do not warn if there are simply no matching ebuilds since |
14 |
that would be annoying in some cases. |
15 |
|
16 |
|
17 |
Modified: main/trunk/pym/_emerge/__init__.py |
18 |
=================================================================== |
19 |
--- main/trunk/pym/_emerge/__init__.py 2008-02-08 08:01:09 UTC (rev 9292) |
20 |
+++ main/trunk/pym/_emerge/__init__.py 2008-02-08 08:39:58 UTC (rev 9293) |
21 |
@@ -2082,15 +2082,41 @@ |
22 |
continue |
23 |
pkg, existing_node = self._select_package( |
24 |
myroot, atom, onlydeps=onlydeps) |
25 |
- if not pkg or \ |
26 |
- (pkg.installed and portdb.xmatch("match-all", atom) \ |
27 |
- and not portdb.xmatch("bestmatch-visible", atom)): |
28 |
+ if not pkg: |
29 |
if not (isinstance(arg, SetArg) and \ |
30 |
arg.name in ("system", "world")): |
31 |
self._show_unsatisfied_dep(myroot, atom) |
32 |
return 0, myfavorites |
33 |
self._missing_args.append((arg, atom)) |
34 |
continue |
35 |
+ if pkg.installed: |
36 |
+ # Warn if all matching ebuilds are masked or |
37 |
+ # the installed package itself is masked. Do |
38 |
+ # not warn if there are simply no matching |
39 |
+ # ebuilds since that would be annoying in some |
40 |
+ # cases: |
41 |
+ # |
42 |
+ # - binary packages installed from an overlay |
43 |
+ # that is not listed in PORTDIR_OVERLAY |
44 |
+ # |
45 |
+ # - multi-slot atoms listed in the world file |
46 |
+ # to prevent depclean from removing them |
47 |
+ |
48 |
+ installed_masked = not visible( |
49 |
+ pkgsettings, pkg.cpv, pkg.metadata, |
50 |
+ built=pkg.built, installed=pkg.installed) |
51 |
+ |
52 |
+ all_ebuilds_masked = bool( |
53 |
+ portdb.xmatch("match-all", atom) and |
54 |
+ not portdb.xmatch("bestmatch-visible", atom)) |
55 |
+ |
56 |
+ if installed_masked or all_ebuilds_masked: |
57 |
+ self._missing_args.append((arg, atom)) |
58 |
+ |
59 |
+ if "selective" not in self.myparams: |
60 |
+ self._show_unsatisfied_dep(myroot, atom) |
61 |
+ return 0, myfavorites |
62 |
+ |
63 |
self._dep_stack.append( |
64 |
Dependency(atom=atom, root=myroot, parent=arg)) |
65 |
if not self._create_graph(): |
66 |
|
67 |
-- |
68 |
gentoo-commits@l.g.o mailing list |