Nilesh Patra pushed to branch master at lintian / lintian
Commits:
4dba9e85 by Nilesh Patra at 2026-07-07T19:21:10+05:30
Rules.pm: Use `compat_level` processable to determine compat value instead of
checking for `debhelper-compat` in B-D
Also drop redundant `// {}` in Debhelper.pm - we are always returning a
valid hashref
- - - - -
2 changed files:
- lib/Lintian/Check/Debhelper.pm
- lib/Lintian/Check/Debian/Rules.pm
Changes:
=====================================
lib/Lintian/Check/Debhelper.pm
=====================================
@@ -515,7 +515,7 @@ sub source {
}
my $control_item=$self->processable->debian_control->item;
- $debhelper_level_info = $self->processable->compat_level // {};
+ $debhelper_level_info = $self->processable->compat_level;
$debhelper_level = $debhelper_level_info->{level};
$debhelper_compat_source = $debhelper_level_info->{source};
$virtual_compat = $debhelper_level
=====================================
lib/Lintian/Check/Debian/Rules.pm
=====================================
@@ -35,6 +35,7 @@ with 'Lintian::Check';
const my $EMPTY => q{};
const my $SPACE => q{ };
const my $PERCENT => q{%};
+const my $MIN_DH_COMPAT_DH_AUTO_TEST => 13;
my @py3versions = qw(3.13 3.14);
@@ -594,8 +595,14 @@ sub source {
}
}
- if (my $memorized_position = $overridden{'dh_auto_test'}
- and ! $build_regular->satisfies('debhelper-compat (>= 13)')) {
+ my $debhelper_level_info = $self->processable->compat_level;
+ if (
+ my $memorized_position = $overridden{'dh_auto_test'}
+ and ! (
+ length $debhelper_level_info->{level}
+ && $debhelper_level_info->{level} >= $MIN_DH_COMPAT_DH_AUTO_TEST
+ )
+ ) {
my @rules = grep {
!m{^\t\s*[\:\[]}
View it on GitLab:
https://salsa.debian.org/lintian/lintian/-/commit/4dba9e854eabb7fd09c498ec713f07c1c4d7d9d6
--
View it on GitLab:
https://salsa.debian.org/lintian/lintian/-/commit/4dba9e854eabb7fd09c498ec713f07c1c4d7d9d6
You're receiving this email because of your account on salsa.debian.org. Manage
all notifications: https://salsa.debian.org/-/profile/notifications | Help:
https://salsa.debian.org/help