summaryrefslogtreecommitdiffstats
path: root/lib/Debian/Debhelper/DH
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 16:37:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 16:37:29 +0000
commit02d0b2a8ef5a2dff3f22d29dee7800d9a5928e86 (patch)
tree879d7ae69586f509481289e50746748c098500b8 /lib/Debian/Debhelper/DH
parentAdding upstream version 13.15.3. (diff)
downloaddebhelper-02d0b2a8ef5a2dff3f22d29dee7800d9a5928e86.tar.xz
debhelper-02d0b2a8ef5a2dff3f22d29dee7800d9a5928e86.zip
Adding upstream version 13.16.upstream/13.16
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/Debian/Debhelper/DH')
-rw-r--r--lib/Debian/Debhelper/DH/AddonAPI.pm6
-rw-r--r--lib/Debian/Debhelper/DH/SequenceState.pm1
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/Debian/Debhelper/DH/AddonAPI.pm b/lib/Debian/Debhelper/DH/AddonAPI.pm
index f8328e3..16d7498 100644
--- a/lib/Debian/Debhelper/DH/AddonAPI.pm
+++ b/lib/Debian/Debhelper/DH/AddonAPI.pm
@@ -143,12 +143,15 @@ sub insert_after {
sub remove_command {
my ($command) = @_;
# Implement if actually needed (I *think* it basically means to transform dh_foo to dh_foo -a/-i)
+ # Remember to adapt the `commands_removed_by_sequence` logic to handle this one as well.
_assert_not_conditional_sequence_addon('remove_command');
my @affected_sequences = _sequences_containing_cmd($command);
@affected_sequences = _filter_sequences_for_conditional_add_ons(@affected_sequences);
return 1 if not @affected_sequences;
for my $seq (@affected_sequences) {
- $seq->remove_command($command);
+ if ($seq->remove_command($command)) {
+ $Debian::Debhelper::DH::SequenceState::commands_removed_by_sequence{$command} = $DH_INTERNAL_ADDON_NAME;
+ }
}
return 1;
}
@@ -221,6 +224,7 @@ sub declare_command_obsolete {
}
_assert_not_conditional_sequence_addon('declare_command_obsolete');
$Debian::Debhelper::DH::SequenceState::obsolete_command{$command} = [$DH_INTERNAL_ADDON_NAME, $error_compat];
+ $Debian::Debhelper::DH::SequenceState::commands_removed_by_sequence{$command} = '';
return 1;
}
diff --git a/lib/Debian/Debhelper/DH/SequenceState.pm b/lib/Debian/Debhelper/DH/SequenceState.pm
index b029e01..539eced 100644
--- a/lib/Debian/Debhelper/DH/SequenceState.pm
+++ b/lib/Debian/Debhelper/DH/SequenceState.pm
@@ -21,6 +21,7 @@ our (
@options,
# Options passed by name (to assist can_skip with which options are used)
%seen_options,
+ %commands_removed_by_sequence,
# Whether there were sequences of options that inhibit certain optimizations
# * $unoptimizable_option_bundle => can skip iff cli-options hint is present and empty
# * $unoptimizable_user_option => We can never skip anything (non-option seen)