From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-commits+bounces-397266-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1RKhvf-0003Nf-1X
	for garchives@archives.gentoo.org; Mon, 31 Oct 2011 02:48:51 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 62FDB21C0DD;
	Mon, 31 Oct 2011 02:48:09 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 3682521C0DD
	for <gentoo-commits@lists.gentoo.org>; Mon, 31 Oct 2011 02:48:09 +0000 (UTC)
Received: from pelican.gentoo.org (unknown [66.219.59.40])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 7638A1B4009
	for <gentoo-commits@lists.gentoo.org>; Mon, 31 Oct 2011 02:48:08 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id 8E7E380051
	for <gentoo-commits@lists.gentoo.org>; Mon, 31 Oct 2011 02:48:07 +0000 (UTC)
From: "Kent Fredric" <kentfredric@gmail.com>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Kent Fredric" <kentfredric@gmail.com>
Message-ID: <95d1d237d95adbaeeddb824a8bee852cd8614bbf.kent@gentoo>
Subject: [gentoo-commits] proj/perl-overlay:master commit in: scripts/
X-VCS-Repository: proj/perl-overlay
X-VCS-Files: scripts/show_deptree.pl
X-VCS-Directories: scripts/
X-VCS-Committer: kent
X-VCS-Committer-Name: Kent Fredric
X-VCS-Revision: 95d1d237d95adbaeeddb824a8bee852cd8614bbf
Date: Mon, 31 Oct 2011 02:48:07 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: c614d1e1-d18b-47e6-8c61-edb1f71cfe03
X-Archives-Hash: e85f2e5d8d857026416980ada76c0e35

commit:     95d1d237d95adbaeeddb824a8bee852cd8614bbf
Author:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
AuthorDate: Sun Oct 30 20:29:51 2011 +0000
Commit:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
CommitDate: Mon Oct 31 02:45:47 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/perl-overlay.=
git;a=3Dcommit;h=3D95d1d237

Sort and print by phase order

---
 scripts/show_deptree.pl |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/scripts/show_deptree.pl b/scripts/show_deptree.pl
index 8b78896..e49728d 100755
--- a/scripts/show_deptree.pl
+++ b/scripts/show_deptree.pl
@@ -340,11 +340,19 @@ sub gentooize_pkg {
   return 'dev-perl/' . $pkg;
 }
=20
+my @queue;
+
 for my $module ( keys %modules ) {
   for my $declaration ( @{ $modules{$module} } ) {
-    handle_declaration( $release, $module, $declaration, *STDOUT );
+    push @queue, [ $module, $declaration ];
   }
 }
+my @squeue =3D
+  sort { $a->[1]->[2] cmp $b->[1]->[2] or $a->[1]->[3] cmp $b->[1]->[3] =
or $a->[0] cmp $b->[0] } @queue;
+
+for my $qi (@squeue) {
+  handle_declaration( $release, @{$qi}, *STDOUT );
+}
=20
 use Data::Dump qw( pp );
 use JSON qw( to_json encode_json );