my $array=shift;
my %params=@_;
+ if (! exists $params{bundling} || $params{bundling}) {
+ Getopt::Long::config("bundling");
+ }
+
my @test;
my %options=(
"v" => \$dh{VERBOSE},
}
foreach my $opt (@test) {
- # Try to parse an option, but ignore it
+ # Try to parse an option, and skip it
# if it is not known.
- if (getoptions([$opt], %params, test => 1)) {
+ if (getoptions([$opt], %params,
+ ignore_unknown_options => 0,
+ test => 1)) {
getoptions([$opt], %params);
}
}
# dh through an override target to a command.
if (defined $ENV{DH_INTERNAL_OPTIONS}) {
@ARGV_extra=split(/\x1e/, $ENV{DH_INTERNAL_OPTIONS});
- getoptions(\@ARGV_extra, %params, ignore_unknown_options => 1);
+ getoptions(\@ARGV_extra, %params);
# Avoid forcing acting on packages specified in
# DH_INTERNAL_OPTIONS. This way, -p can be specified
my $ret=getoptions(\@ARGV, %params);
if (!$ret) {
- warning("warning: unknown options will be a fatal error in a future debhelper release");
- #error("unknown option; aborting");
+ if (! compat(7)) {
+ error("unknown option; aborting");
+ }
}
# Check to see if -V was specified. If so, but no parameters were
if ($dh{DOINDEP} || $dh{DOARCH}) {
# User specified that all arch (in)dep package be
# built, and there are none of that type.
- warning("You asked that all arch in(dep) packages be built, but there are none of that type.");
+ if (! $dh{BLOCK_NOOP_WARNINGS}) {
+ warning("You asked that all arch in(dep) packages be built, but there are none of that type.");
+ }
exit(0);
}
- push @{$dh{DOPACKAGES}},getpackages();
+ push @{$dh{DOPACKAGES}},getpackages("both");
}
# Remove excluded packages from the list of packages to act on.
@{$dh{DOPACKAGES}}=@package_list;
if (! defined $dh{DOPACKAGES} || ! @{$dh{DOPACKAGES}}) {
- warning("No packages to build.");
+ if (! $dh{BLOCK_NOOP_WARNINGS}) {
+ warning("No packages to build.");
+ }
exit(0);
}
@ARGV=@{$dh{ARGV}} if exists $dh{ARGV};
}
-sub import {
- # Enable bundling of short command line options.
- Getopt::Long::config("bundling");
-}
-
1