Add --debug support for --depclean.
authorZac Medico <zmedico@gentoo.org>
Sun, 17 Dec 2006 20:41:49 +0000 (20:41 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 17 Dec 2006 20:41:49 +0000 (20:41 -0000)
svn path=/main/trunk/; revision=5311

bin/emerge

index bd53fb8b4f0796c8ccd508e1e4aa2f2ccb8c7d3a..dfe4c1a345ce1efe87f67b01b31c7a48976167d9 100755 (executable)
@@ -4153,6 +4153,17 @@ def action_depclean(settings, trees, ldpath_mtimes,
                        mydeps.append((" ".join(myaux.values()), hard))
                        usedef = vardb.aux_get(pkg, ["USE"])[0].split()
                        for depstr, priority in mydeps:
+
+                               if "--debug" in myopts:
+                                       print
+                                       print "Parent:   ", pkg
+                                       print "Depstring:", depstr
+                                       print "Priority:",
+                                       if priority == soft:
+                                               print "soft"
+                                       else:
+                                               print "hard"
+
                                success, atoms = portage.dep_check(depstr, None, settings,
                                        myuse=usedef, trees=trees, myroot=settings["ROOT"])
                                if not success:
@@ -4160,6 +4171,10 @@ def action_depclean(settings, trees, ldpath_mtimes,
                                        print "Error occurred while processing",pkg
                                        print str(atoms)
                                        return
+
+                               if "--debug" in myopts:
+                                       print "Candidates:", atoms
+
                                for atom in atoms:
                                        remaining_atoms.append((atom, pkg, priority))