From 7109bc566b2aa72fd49a383ef12c5d87b4f95dea Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 2 Sep 2023 11:45:50 +0100 Subject: get_source_format: Return an array These options can accumulate. Signed-off-by: Ian Jackson --- dgit | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/dgit b/dgit index 3f0b0aa..36055ed 100755 --- a/dgit +++ b/dgit @@ -4147,19 +4147,13 @@ END } sub get_source_format () { - my %options; + my @options; if (open F, "debian/source/options") { while () { next if m/^\s*\#/; next unless m/\S/; s/\s+$//; # ignore missing final newline - if (m/\s*\=\s*/) { - my ($k, $v) = ($`, $'); #'); - $v =~ s/^"(.*)"$/$1/; - $options{$k} = $v; - } else { - $options{$_} = 1; - } + push @options, $_; } F->error and confess "$!"; close F; @@ -4175,7 +4169,7 @@ sub get_source_format () { F->error and confess "$!"; close F; chomp; - return wantarray ? ($_, \%options) : $_; + return wantarray ? ($_, \@options) : $_; } sub madformat_wantfixup ($) { @@ -6208,7 +6202,7 @@ sub build_maybe_quilt_fixup () { } chdir '..'; - if ($fopts->{'single-debian-patch'}) { + if (grep m{^single-debian-patch$}, @$fopts) { fail f_ "quilt mode %s does not make sense (or is not supported) with single-debian-patch", $quilt_mode -- cgit v1.2.3