When deps are forced to be satisfied by installed packages due to masking
authorZac Medico <zmedico@gentoo.org>
Mon, 31 Mar 2008 23:47:50 +0000 (23:47 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 31 Mar 2008 23:47:50 +0000 (23:47 -0000)
or unavailability, only tolerate it when the atom comes from either the
system or world set since otherwise it's a good idea to bail so that the
user can correct the problem.

svn path=/main/trunk/; revision=9656

pym/_emerge/__init__.py

index 54cdb2abd3b47a3082462908d53edef0f7e8231c..166ea1cb64a0a929bebdf81cdea6a90d758c90b1 100644 (file)
@@ -2270,12 +2270,17 @@ class depgraph(object):
                                                self._missing_args.append((arg, atom))
                                                continue
                                        if pkg.installed and "selective" not in self.myparams:
+                                               self._unsatisfied_deps_for_display.append(
+                                                       ((myroot, atom), {}))
                                                # Previous behavior was to bail out in this case, but
                                                # since the dep is satisfied by the installed package,
                                                # it's more friendly to continue building the graph
-                                               # and just show a warning message.
-                                               self._unsatisfied_deps_for_display.append(
-                                                       ((myroot, atom), {}))
+                                               # and just show a warning message. Therefore, only bail
+                                               # out here if the atom is not from either the system or
+                                               # world set.
+                                               if not (isinstance(arg, SetArg) and \
+                                                       arg.name in ("system", "world")):
+                                                       return 0, myfavorites
 
                                        self._dep_stack.append(
                                                Dependency(atom=atom, onlydeps=onlydeps, root=myroot, parent=arg))