Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Zac Medico (zmedico)" <zmedico@g.o>
Subject: portage r12949 - main/branches/2.1.6/pym/_emerge
Date: Wed, 11 Mar 2009 06:14:18 +0000
Author: zmedico
Date: 2009-03-11 06:14:17 +0000 (Wed, 11 Mar 2009)
New Revision: 12949

Modified:
   main/branches/2.1.6/pym/_emerge/__init__.py
Log:
When displaying reverse dependencies in verbose --depclean/--prune output,
sort the parent packages by cpv. (trunk r12691)

Modified: main/branches/2.1.6/pym/_emerge/__init__.py
===================================================================
--- main/branches/2.1.6/pym/_emerge/__init__.py	2009-03-11 06:13:14 UTC (rev 12948)
+++ main/branches/2.1.6/pym/_emerge/__init__.py	2009-03-11 06:14:17 UTC (rev 12949)
@@ -13457,13 +13457,22 @@
 		msg.append("\n")
 		portage.writemsg_stdout("".join(msg), noiselevel=-1)
 
+	def cmp_pkg_cpv(pkg1, pkg2):
+		"""Sort Package instances by cpv."""
+		if pkg1.cpv > pkg2.cpv:
+			return 1
+		elif pkg1.cpv == pkg2.cpv:
+			return 0
+		else:
+			return -1
+
 	def create_cleanlist():
 		pkgs_to_remove = []
 
 		if action == "depclean":
 			if args_set:
 
-				for pkg in vardb:
+				for pkg in sorted(vardb, key=cmp_sort_key(cmp_pkg_cpv)):
 					arg_atom = None
 					try:
 						arg_atom = args_set.findAtomForPackage(pkg)
@@ -13478,7 +13487,7 @@
 							show_parents(pkg)
 
 			else:
-				for pkg in vardb:
+				for pkg in sorted(vardb, key=cmp_sort_key(cmp_pkg_cpv)):
 					if pkg not in graph:
 						pkgs_to_remove.append(pkg)
 					elif "--verbose" in myopts:



Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
portage r12948 - main/branches/2.1.6/pym/portage
Next by thread:
portage r12950 - main/branches/2.1.6/pym/portage
Previous by date:
portage r12948 - main/branches/2.1.6/pym/portage
Next by date:
portage r12950 - main/branches/2.1.6/pym/portage


Updated Mar 27, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.