SVN devscripts commit: r530 - in trunk: debian scripts
Stefano Zacchiroli
zack at alioth.debian.org
Sat Feb 24 12:31:42 CET 2007
Author: zack
Date: 2007-02-24 12:31:42 +0100 (Sat, 24 Feb 2007)
New Revision: 530
Modified:
trunk/debian/changelog
trunk/scripts/dd-list.1
trunk/scripts/dd-list.pl
Log:
- added patch from Frank Kuster to enable output of binary package names from
dd-list
- shortened my changelog entry part
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2007-02-24 11:18:09 UTC (rev 529)
+++ trunk/debian/changelog 2007-02-24 11:31:42 UTC (rev 530)
@@ -19,20 +19,19 @@
(specifically backports.org)
[ Stefano Zacchiroli ]
- * debian/control
- - added myself as an uploader
- - added XS-Vcs-Browser field
- - bumped debhelper dependencies to >> 5
- * added debian/svn-deblayout pointing to the default tags dir (used by
- svn-buildpackage)
- * bumped debhelper compatibility level to 5
- * moved examples under examples/, install examples/* as examples
- * debian/{dirs,links}: delegated (some of) directory and symlink creation to
- debhelpers
- * debian/manpages: delegated installation of (original and translated)
- manpages to debhelpers
- * moved scripts under scripts/, created subordinated Makefile there
- * scripts/Makefile: removed the need of explicitly listing scripts
+ * package maintenance changes
+ + debian/control:
+ - added myself as an uploader
+ - added XS-Vcs-Browser field
+ - bumped debhelper deps to >> 5 (changed debian/compat accordingly)
+ + added debian/svn-deblayout with the default tags dir
+ + moved examples under examples/ (changed debian/examples accordingly)
+ + moved scripts under scripts/, created subordinated Makefile there
+ + debian/{dirs,links}: delegated directory/symlink creation to dh_link
+ + debian/manpages: delegated manpage installation to dh_installman
+ + scripts/Makefile: removed the need of explicitly listing scripts
+ * dd-list: enable output of binary package names, patch from Frank Küster
+ (Closes: #403207)
-- Stefano Zacchiroli <zack at debian.org> Sat, 24 Feb 2007 12:13:56 +0100
Modified: trunk/scripts/dd-list.1
===================================================================
--- trunk/scripts/dd-list.1 2007-02-24 11:18:09 UTC (rev 529)
+++ trunk/scripts/dd-list.1 2007-02-24 11:31:42 UTC (rev 530)
@@ -33,7 +33,7 @@
.B --stdin
is given).
Output is a list of the following format, where package names are source
-packages:
+packages by default:
.PP
.nf
.RS
@@ -70,12 +70,20 @@
apt-cache. This is the fastest way to use dd-list, as it uses the
maintainer information from the input instead of looking up the maintainer
of each listed package.
+.IP
+If no \fISource:\fP line is given, the \fIPackage:\fP name is used for
+output, which might be a binary package name.
.TP
.BR \-u , \-\-uploaders
Also list developers who are named as uploaders of packages, not only
the maintainers. Uploaders are indicated with "(U)" appended to the
package name.
.TP
+.BR \-b , \-\-print\-binary
+Use binary package names in the output instead of source package names
+(has no effect with \fB--dctrl\fP if the \fIPackage:\fP line contains
+source package names).
+.TP
.BR \-V , \-\-version
Print the version.
.\" --------------------------------------------------------------------
Modified: trunk/scripts/dd-list.pl
===================================================================
--- trunk/scripts/dd-list.pl 2007-02-24 11:18:09 UTC (rev 529)
+++ trunk/scripts/dd-list.pl 2007-02-24 11:31:42 UTC (rev 530)
@@ -26,10 +26,10 @@
my $version='###VERSION###';
sub get_developers_given_package {
- my $package_name=shift;
+ my ($package_name,$print_binary) = @_;
my $developer;
- my $source_name;
+ my $print_name;
my $uploaders;
my @uploaders;
open (F, "apt-cache showsrc '$package_name' |");
@@ -44,11 +44,11 @@
}
elsif (/^Package: (.*)/) {
- $source_name=$1;
+ $print_name = $print_binary ? $package_name : $1 ;
}
}
close F;
- return ($developer, \@uploaders, $source_name);
+ return ($developer, \@uploaders, $print_name);
}
sub parse_developer {
@@ -86,6 +86,10 @@
-u, --uploaders
Also list uploaders of packages, not only the listed maintainers
+ -b, --print-binary
+ If binary package names are given as input, print these names
+ in the output instead of corresponding source packages.
+
-V, --version
Print version (it\'s $version by the way).
EOF
@@ -94,11 +98,13 @@
my $use_stdin=0;
my $use_dctrl=0;
my $show_uploaders=0;
+my $print_binary=0;
if (! GetOptions(
"help" => sub { help(); exit },
"stdin|i" => \$use_stdin,
"dctrl|d" => \$use_dctrl,
"uploaders|u" => \$show_uploaders,
+ "print-binary|b" => \$print_binary,
"version" => sub { print "dd-list version $version\n" })) {
exit(1);
}
@@ -114,7 +120,7 @@
if (/^Package:\s+(.*)$/m) {
$package=$1;
}
- if (/^Source:\s+(.*)$/m) {
+ if (/^Source:\s+(.*)$/m && ! $print_binary ) {
$package=$1;
}
if (/^Maintainer:\s+(.*)$/m) {
@@ -154,12 +160,12 @@
}
foreach my $package_name (@package_names) {
- my ($developer, $uploaders, $source_name)=get_developers_given_package($package_name);
+ my ($developer, $uploaders, $print_name)=get_developers_given_package($package_name,$print_binary);
if (defined $developer) {
- push @{$dict{$developer}}, $source_name;
+ push @{$dict{$developer}}, $print_name;
if ($show_uploaders && @$uploaders) {
foreach my $uploader (@$uploaders) {
- push @{$dict{$uploader}}, "$source_name (U)";
+ push @{$dict{$uploader}}, "$print_name (U)";
}
}
}
More information about the Devscripts-devel
mailing list