[devscripts] 01/02: dd-list: Strip arch-qualifiers from given package names
James McCoy
jamessan at debian.org
Thu Jun 11 03:38:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch master
in repository devscripts.
commit 885a32da45cdfb1afdec4d9d8d8dc5d75751786e
Author: James McCoy <jamessan at debian.org>
Date: Wed Jun 10 23:06:09 2015 -0400
dd-list: Strip arch-qualifiers from given package names
Closes: #788367
Signed-off-by: James McCoy <jamessan at debian.org>
---
debian/changelog | 2 ++
scripts/dd-list.pl | 22 ++++++++++++++++------
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index cc00589..d7f6ee8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -46,6 +46,8 @@ devscripts (2.15.5) UNRELEASED; urgency=medium
* mergechanges:
+ Add -d option to delete input files on success. Thanks to Mark Hymers
for the patch. (Closes: #640068)
+ * dd-list:
+ + Strip arch-qualifiers from given package names. (Closes: #788367)
[ Dominique Dumont ]
* licensecheck:
diff --git a/scripts/dd-list.pl b/scripts/dd-list.pl
index 74cdf54..bb97302 100755
--- a/scripts/dd-list.pl
+++ b/scripts/dd-list.pl
@@ -27,6 +27,13 @@ use Getopt::Long qw(:config gnu_getopt);
my $version='###VERSION###';
+sub normalize_package {
+ my $name = shift;
+ # Remove any arch-qualifier
+ $name =~ s/:.*//;
+ return lc($name);
+}
+
sub sort_developers {
return map { $_->[0] }
sort { $a->[1] cmp $b->[1] }
@@ -166,16 +173,19 @@ if ($use_dctrl) {
parsefh(\*STDIN, 'STDIN');
}
else {
+ my @packages;
if ($use_stdin) {
- while (<STDIN>) {
- chomp;
- s/^\s+//;
- s/\s+$//;
- map { $package_name{lc($_)} = 1 } split ' ', $_;
+ while (my $line = <STDIN>) {
+ chomp $line;
+ $line =~ s/^\s+|\s+$//g;
+ push @packages, split(' ', $line);
}
}
else {
- map { $package_name{lc($_)} = 1 } @ARGV;
+ @packages = @ARGV;
+ }
+ for my $name (@packages) {
+ $package_name{normalize_package($name)} = 1;
}
unless (@{$source_files}) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list