public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] Sort repoman check results in output
@ 2014-03-30 11:55 Michał Górny
  2014-03-30 15:06 ` Alexander Berntsen
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2014-03-30 11:55 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Michał Górny

Currently, the check results are output in dict order which is
implementation-defined. This makes it hard to compare results coming
from two machines (Python versions).

Instead, sort all the results lexically.
---
 pym/repoman/utilities.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py
index aec61fe..415825e 100644
--- a/pym/repoman/utilities.py
+++ b/pym/repoman/utilities.py
@@ -309,7 +309,7 @@ def format_qa_output(formatter, stats, fails, dofull, dofail, options, qawarning
 	full = options.mode == 'full'
 	# we only want key value pairs where value > 0 
 	for category, number in \
-		filter(lambda myitem: myitem[1] > 0, iter(stats.items())):
+		filter(lambda myitem: myitem[1] > 0, sorted(stats.items())):
 		formatter.add_literal_data("  " + category.ljust(30))
 		if category in qawarnings:
 			formatter.push_style("WARN")
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [gentoo-portage-dev] [PATCH] Sort repoman check results in output
  2014-03-30 11:55 [gentoo-portage-dev] [PATCH] Sort repoman check results in output Michał Górny
@ 2014-03-30 15:06 ` Alexander Berntsen
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Berntsen @ 2014-03-30 15:06 UTC (permalink / raw
  To: gentoo-portage-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Prefer "repoman: Sort check results in output" as a message, as per
the new guidelines in DEVELOPING.

The patch is simple enough. ACK.
- -- 
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iF4EAREIAAYFAlM4MvAACgkQRtClrXBQc7X0AgD+OeF5zzcK8CP/VWBqgxA/OG1T
Y6nr2VE9qJlJ1fkBKdABALMowHaFdJ5G7shwcYWVoswN7VPmTnhqh7s5EgNuURlV
=ZZnK
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-30 15:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-30 11:55 [gentoo-portage-dev] [PATCH] Sort repoman check results in output Michał Górny
2014-03-30 15:06 ` Alexander Berntsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox