Make world atoms non-greedy for SLOTs in action_depclean()
authorZac Medico <zmedico@gentoo.org>
Wed, 24 Oct 2007 01:33:51 +0000 (01:33 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 24 Oct 2007 01:33:51 +0000 (01:33 -0000)
since users can simply add SLOT atoms to world for any
specific SLOTs that they want to keep.

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

pym/_emerge/__init__.py

index 852f53c0308355ca0f9ef6d33e2ffc6b0f68a600..38e87c43aebfb129e96367df5c537871eaa4ae17 100644 (file)
@@ -5654,25 +5654,7 @@ def action_depclean(settings, trees, ldpath_mtimes,
                                if not arg_atom:
                                        filtered_pkgs.append(pkg)
                        pkgs = filtered_pkgs
-               prune_this = False
-               if action == "prune":
-                       for pkg in pkgs:
-                               metadata = dict(izip(metadata_keys,
-                                       vardb.aux_get(pkg, metadata_keys)))
-                               try:
-                                       arg_atom = args_set.findAtomForPackage(pkg, metadata)
-                               except portage.exception.InvalidDependString, e:
-                                       file_path = os.path.join(myroot, VDB_PATH, pkg, "PROVIDE")
-                                       portage.writemsg("\n\nInvalid PROVIDE: %s\n" % str(s),
-                                               noiselevel=-1)
-                                       portage.writemsg("See '%s'\n" % file_path,
-                                               noiselevel=-1)
-                                       del e
-                                       continue
-                               if arg_atom:
-                                       prune_this = True
-                                       break
-               if len(pkgs) > 1 and (parent != "world" or prune_this):
+               if len(pkgs) > 1:
                        # Prune all but the best matching slot, since that's all that a
                        # deep world update would pull in.  Don't prune if this atom comes
                        # directly from world though, since world atoms are greedy when