summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Dh_Getopt.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Debian/Debhelper/Dh_Getopt.pm')
-rw-r--r--Debian/Debhelper/Dh_Getopt.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm
index 53db13ae..364187a1 100644
--- a/Debian/Debhelper/Dh_Getopt.pm
+++ b/Debian/Debhelper/Dh_Getopt.pm
@@ -149,6 +149,8 @@ sub parseopts {
"L|libpackage=s" => \$options{LIBPACKAGE},
+ "name=s" => \$options{NAME},
+
"<>" => \&NonOption,
);
@@ -173,13 +175,19 @@ sub parseopts {
}
push @{$options{DOPACKAGES}},GetPackages();
}
-
+
# Remove excluded packages from the list of packages to act on.
+ # Also unique the list, in case some options were specified that
+ # added a package to it twice.
my @package_list;
my $package;
+ my %packages_seen;
foreach $package (@{$options{DOPACKAGES}}) {
if (! $exclude_package{$package}) {
- push @package_list, $package;
+ if (! exists $packages_seen{$package}) {
+ $packages_seen{$package}=1;
+ push @package_list, $package;
+ }
}
}
@{$options{DOPACKAGES}}=@package_list;