The code was returning all keys and values for %default_substvars, when instead we should have been requesting all %default_substvars and %options keys.
@@ -35,6 +35,7 @@ dpkg (1.18.19) UNRELEASED; urgency=medium
Prompted by Stuart Prescott <stuart@debian.org>.
* Test suite:
- Generate and check all currently possible architecture wildcards.
+ - Correctly iterate over all default and passed .dsc template substvars.
[ Updated programs translations ]
* German (Sven Joachim).
@@ -89,7 +89,7 @@ sub gen_source
my (%options) = @_;
my $substvars = Dpkg::Substvars->new();
- foreach my $var (%default_substvars) {
+ foreach my $var ((keys %default_substvars, keys %options)) {
my $value = $options{$var} // $default_substvars{$var};
$substvars->set_as_auto($var, $value);