diff options
Diffstat (limited to 'lib/Debian/Debhelper/DH')
-rw-r--r-- | lib/Debian/Debhelper/DH/AddonAPI.pm | 6 | ||||
-rw-r--r-- | lib/Debian/Debhelper/DH/SequenceState.pm | 1 |
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) |