Thread View: linux.debian.bugs.dist
3 messages
3 total messages
Started by Noah Meyerhans
Tue, 13 Oct 2026 19:30
Bug#1031878: --fail-on warnings fails overrides even though --fail-on overrides is not specified
Author: Noah Meyerhans
Date: Tue, 13 Oct 2026 19:30
Date: Tue, 13 Oct 2026 19:30
59 lines
4669 bytes
4669 bytes
Control: tags -1 + patch
On Thu, Aug 17, 2023 at 01:13:05PM +0200, Philipp Huebner wrote:
> What was strange though: some packages hit this bug, others did not.
>
> Turns out it is related to "automatic" overrides being present or not.
> A python package of mine had automatic overrides for
> "package-contains-documentation-outside-usr-share-doc
> [usr/lib/python3/dist-packages/PackageName-Version.egg-info*]"
>
> The --show-overrides option (hitting #1019690 here) said:
> "N: masked by screen python/egg/metadata"
>
> After adding explicit overrides in the package the --fail-on function worked
> correctly again and I got exit code 0 instead of 2.
So the issue is that these "automatic" overrides aren't actually
overrides internally, but "masks". Lintian's default EWI output treats
masked and overridden tags similarly, in terms of display priority, but
does not treat them the same when it comes to the fail-on parameter.
The following patch changes lintian to treat masks like overrides when
counting reported tags. With this patch applied, tags that are masked
internally no longer count as reported, so they don't trigger "fail-on"
for different severities. Note that it specifically does *not* trigger
'--fail-on override'. That would be easy to implement, but I don't
think it's the right thing to do, as a masked tag is not really under a
package maintainer's control and doesn't indicate anything that they've
specifically enabled in their package.
This is a slight change in behavior, but I think it's a reasonable one.
The existence of this bug highlights how confusing the current behavior
can be.
From dca99e1438ef25518bbb440ceb2e7c540f5a14b1 Mon Sep 17 00:00:00 2001
From: Noah Meyerhans <noahm@debian.org>
Date: Tue, 13 Oct 2026 14:35:48 -0400
Subject: [PATCH] don't count masked tags as reported
Closes: #1031878
---
lib/Lintian/Pool.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Lintian/Pool.pm b/lib/Lintian/Pool.pm
index db153f989..f7c0157b7 100644
--- a/lib/Lintian/Pool.pm
+++ b/lib/Lintian/Pool.pm
@@ -191,7 +191,7 @@ sub process{
next
unless $PROFILE->display_level_for_tag($hint->tag_name);
- if (!defined $hint->override) {
+ if (!defined $hint->override && !@{$hint->masks}) {
++$reported_count{$tag->visibility}
if !$tag->experimental;
--
2.47.3
Bug#1031878: --fail-on warnings fails overrides even though --fail-on overrides is not specified
Author: Nilesh Patra
Date: Tue, 13 Oct 2026 20:00
Date: Tue, 13 Oct 2026 20:00
68 lines
5962 bytes
5962 bytes
On 14/10/26 12:36 am, Noah Meyerhans wrote:
> Control: tags -1 + patch
>
> On Thu, Aug 17, 2023 at 01:13:05PM +0200, Philipp Huebner wrote:
>> What was strange though: some packages hit this bug, others did not.
>>
>> Turns out it is related to "automatic" overrides being present or not.
>> A python package of mine had automatic overrides for
>> "package-contains-documentation-outside-usr-share-doc
>> [usr/lib/python3/dist-packages/PackageName-Version.egg-info*]"
>>
>> The --show-overrides option (hitting #1019690 here) said:
>> "N: masked by screen python/egg/metadata"
>>
>> After adding explicit overrides in the package the --fail-on function worked
>> correctly again and I got exit code 0 instead of 2.
>
> So the issue is that these "automatic" overrides aren't actually
> overrides internally, but "masks". Lintian's default EWI output treats
> masked and overridden tags similarly, in terms of display priority, but
> does not treat them the same when it comes to the fail-on parameter.
>
> The following patch changes lintian to treat masks like overrides when
> counting reported tags. With this patch applied, tags that are masked
> internally no longer count as reported, so they don't trigger "fail-on"
> for different severities. Note that it specifically does *not* trigger
> '--fail-on override'. That would be easy to implement, but I don't
> think it's the right thing to do, as a masked tag is not really under a
> package maintainer's control and doesn't indicate anything that they've
> specifically enabled in their package.
>
> This is a slight change in behavior, but I think it's a reasonable one.
> The existence of this bug highlights how confusing the current behavior
> can be.
As such, I dislike the idea of screen altogether - it is simply easier to not
trigger certain tags when they should not be triggered rather than masking it
like this.
Dropping that should not be too difficult, but assessing the impact of it would
need some analysis. I guess for now we could take your patch.
Please make an MR -- it is much easier to review with passing CI.
>
>>From dca99e1438ef25518bbb440ceb2e7c540f5a14b1 Mon Sep 17 00:00:00 2001
> From: Noah Meyerhans <noahm@debian.org>
> Date: Tue, 13 Oct 2026 14:35:48 -0400
> Subject: [PATCH] don't count masked tags as reported
>
> Closes: #1031878
> ---
> lib/Lintian/Pool.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/Lintian/Pool.pm b/lib/Lintian/Pool.pm
> index db153f989..f7c0157b7 100644
> --- a/lib/Lintian/Pool.pm
> +++ b/lib/Lintian/Pool.pm
> @@ -191,7 +191,7 @@ sub process{
> next
> unless $PROFILE->display_level_for_tag($hint->tag_name);
>
> - if (!defined $hint->override) {
> + if (!defined $hint->override && !@{$hint->masks}) {
>
> ++$reported_count{$tag->visibility}
> if !$tag->experimental;
Bug#1031878: --fail-on warnings fails overrides even though --fail-on overrides is not specified
Author: Noah Meyerhans
Date: Tue, 13 Oct 2026 21:00
Date: Tue, 13 Oct 2026 21:00
34 lines
4118 bytes
4118 bytes
On Wed, Oct 14, 2026 at 01:11:28AM +0530, Nilesh Patra wrote: > > The following patch changes lintian to treat masks like overrides when > > counting reported tags. With this patch applied, tags that are masked > > internally no longer count as reported, so they don't trigger "fail-on" > > for different severities. Note that it specifically does *not* trigger > > '--fail-on override'. That would be easy to implement, but I don't > > think it's the right thing to do, as a masked tag is not really under a > > package maintainer's control and doesn't indicate anything that they've > > specifically enabled in their package. > > > > This is a slight change in behavior, but I think it's a reasonable one. > > The existence of this bug highlights how confusing the current behavior > > can be. > > As such, I dislike the idea of screen altogether - it is simply easier to not > trigger certain tags when they should not be triggered rather than masking it > like this. Yeah, this wasn't something I'd seen before and I was a bit surprised by it. I don't know the history of these screens/masks, but I suspect the idea was to simplify the creation of exceptions without requiring them to be built into the checks directly. It makes sense, but is obviously a little unexpected. > Dropping that should not be too difficult, but assessing the impact of it would > need some analysis. I guess for now we could take your patch. > > Please make an MR -- it is much easier to review with passing CI. https://salsa.debian.org/lintian/lintian/-/merge_requests/820 noah
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads