Source: devscripts Version: 2.16.7 Severity: wishlist Tags: patch Hi,
One common pattern for myself is building an equivs package with mk-build-deps and *then* installing some other useful packages I need for building packages that are — obviously! — not listed in the Build-Depends field, for example diffoscope, lintian, tcpdump, etc. It would be nice if I could do these in one install call, hence an "--extra-packages" option. Patch attached. Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
diff --git a/scripts/mk-build-deps.pl b/scripts/mk-build-deps.pl index 4e31654..1d47759 100755 --- a/scripts/mk-build-deps.pl +++ b/scripts/mk-build-deps.pl @@ -100,6 +100,10 @@ dependencies. Generate a package which only depends on the source package's Build-Depends-Indep dependencies. +=item B<-e> I<packages>, B<--extra-packages> I<packages> + +Also install the specified packages. + =item B<-h>, B<--help> Show a summary of options. @@ -142,7 +146,7 @@ use Text::ParseWords; my $progname = basename($0); my $opt_install; my $opt_remove=0; -my ($opt_help, $opt_version, $opt_arch, $opt_dep, $opt_indep, $opt_hostarch, $opt_buildarch); +my ($opt_help, $opt_version, $opt_arch, $opt_dep, $opt_indep, $opt_hostarch, $opt_buildarch, $opt_extra_packages); my $control; my $install_tool; my $root_cmd; @@ -214,6 +218,7 @@ GetOptions("help|h" => \$opt_help, "arch|a=s" => \$opt_arch, "host-arch=s" => \$opt_hostarch, "build-arch=s" => \$opt_buildarch, + "extra-packages|e=s" => \$opt_extra_packages, "build-dep|B" => \$opt_dep, "build-indep|A" => \$opt_indep, "root-cmd|s=s" => \$root_cmd, @@ -458,6 +463,11 @@ sub build_equiv $hostarch = $opt_hostarch; } + my $depends = $opts->{depends} // ""; + if (defined $opt_extra_packages) { + $depends .= ", " . $opt_extra_packages; + } + if ($packagearch eq "all") { if ($buildarch ne $hostarch) { die "build architecture \"$buildarch\" is unequal host architecture \"$hostarch\" in which case the package architecture must not be \"all\" (but \"$hostarch\" instead)\n"; @@ -468,7 +478,7 @@ sub build_equiv my $build_profiles = [ split /\s+/, ($ENV{'DEB_BUILD_PROFILES'} // "") ]; - my $positive = deps_parse($opts->{depends} // "", + my $positive = deps_parse($depends, reduce_arch => 1, host_arch => $hostarch, build_arch => $buildarch,