Inside depgraph._show_unsatisfied_dep(), show reasons for packages masked due
authorZac Medico <zmedico@gentoo.org>
Tue, 25 Aug 2009 05:09:25 +0000 (05:09 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 25 Aug 2009 05:09:25 +0000 (05:09 -0000)
to backtracking.

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

pym/_emerge/depgraph.py

index bd2964f3c46565b4aa370cb38ab824e355533c65..b7aa825259038dd7e7efb9bba84171577a90cbf2 100644 (file)
@@ -1891,9 +1891,8 @@ class depgraph(object):
                                metadata, mreasons  = get_mask_info(root_config, cpv,
                                        pkgsettings, db, pkg_type, built, installed, db_keys)
                                if metadata is not None:
-                                       pkg = Package(built=built, cpv=cpv,
-                                               installed=installed, metadata=metadata,
-                                               root_config=root_config)
+                                       pkg = self._pkg(cpv, pkg_type, root_config,
+                                               installed=installed)
                                        if pkg.cp != atom.cp:
                                                # A cpv can be returned from dbapi.match() as an
                                                # old-style virtual match even in cases when the
@@ -1901,6 +1900,11 @@ class depgraph(object):
                                                # Filter out any such false matches here.
                                                if not atom_set.findAtomForPackage(pkg):
                                                        continue
+                                       if pkg in self._dynamic_config._runtime_pkg_mask:
+                                               backtrack_reasons = \
+                                                       self._dynamic_config._runtime_pkg_mask[pkg]
+                                               mreasons.append('backtracking: %s' % \
+                                                       ', '.join(sorted(backtrack_reasons)))
                                        if mreasons:
                                                masked_pkg_instances.add(pkg)
                                        if atom.use: