r55112 - /scripts/perl-5.10-transition/find-rebuild-order
ntyni at users.alioth.debian.org
ntyni at users.alioth.debian.org
Tue Mar 30 12:05:43 UTC 2010
Author: ntyni
Date: Tue Mar 30 12:03:11 2010
New Revision: 55112
URL: http://svn.debian.org/wsvn/?sc=1&rev=55112
Log:
include source and binNMU versions in the output
Modified:
scripts/perl-5.10-transition/find-rebuild-order
Modified: scripts/perl-5.10-transition/find-rebuild-order
URL: http://svn.debian.org/wsvn/scripts/perl-5.10-transition/find-rebuild-order?rev=55112&op=diff
==============================================================================
--- scripts/perl-5.10-transition/find-rebuild-order (original)
+++ scripts/perl-5.10-transition/find-rebuild-order Tue Mar 30 12:03:11 2010
@@ -66,13 +66,26 @@
=head1 OUTPUT FORMAT
-The machine-readable output consists of lines of the form 'PACKAGE ROUND'
+The machine-readable output consists of lines of the form
+
+PACKAGE ROUND SOURCE_VERSION BINNMU_VERSION
+
where ROUND denotes the rebuild order increasing from 1. It may be 0 for
dependencies of essential or build-essential packages, or 'U' (undefined)
for packages that need each other in a circular manner for building.
The output is always sorted by ROUND, and circular build-dependencies
('U') are detected and printed in the end of the run.
+
+The SOURCE_VERSION field contains the name of the source package and
+its version, joined with an underscore (C<_>). This is the format
+consumed by sbuild(1).
+
+The BINNMU_VERSION field contains a single number, the next free
+binNMU version. For example, if the archive has libfoo-bar-perl version
+1.2-2, BINNMU_VERSION is 1. If the version in the archive is 1.2-2+b1,
+BINNMU_VERSION will be 2. Again, this is field is meant for sbuild(1)
+consumption.
Additionally, explanations targeted at humans (mostly listing reverse
dependencies of the packages) are given on separate lines as Perl-style
@@ -158,6 +171,9 @@
# so we don't need to hunt them down each time
my %uninstallable_dependencies_cache;
+my %binnmu_vers;
+my %src_with_vers;
+
notice("reading apt cache");
for my $pkg (@packages) {
@@ -166,6 +182,8 @@
next;
};
my $s = src_latest(@slist);
+ $src_with_vers{$pkg} = $s->{Package} . "_" . $s->{Version};
+
my $blist = $bincache->{$pkg} or do {
warn("no such binary package: $pkg");
next;
@@ -173,13 +191,14 @@
my $b = bin_latest($blist);
debug("looked up $pkg/$b->{VerStr} from the package cache");
+ $binnmu_vers{$pkg} = ($b->{VerStr} =~ /\+b(\d+)$/ ? 1+$1 : 1);
$source_of{$pkg} = $s;
$uninstallable{$pkg} = $b;
}
notice("starting with " . (scalar keys %uninstallable) . " uninstallable packages");
-print "# Generated by $self\n# <package> <rebuild round>\n";
+print "# Generated by $self\n# <package> <rebuild round> <srcname_srcvers> <next_binnmu_number>\n";
if (exists $opts{e}) {
notice("scanning file $opts{e} for essential packages");
@@ -267,7 +286,7 @@
. join(" ", sort keys %{$needed_by{$_}})
. "\n";
}
- print "$_ $round\n";
+ print "$_ $round $src_with_vers{$_} $binnmu_vers{$_}\n";
}
}
More information about the Pkg-perl-cvs-commits
mailing list