summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2023-09-02 11:45:50 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2023-09-02 12:00:38 +0100
commit7109bc566b2aa72fd49a383ef12c5d87b4f95dea (patch)
tree93cb352056a0ca0e06077a936384941a8f542a37
parent75d7d2b41dee7dd90bbe5a5fa1912357b12c17f8 (diff)
get_source_format: Return an array
These options can accumulate. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-xdgit14
1 files 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 (<F>) {
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