🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #5191

Bug#1153794: lintian: warn that pure-python modules should normally be arch:all (not arch:any)

#5191
From: Nilesh Patra
Date: Fri, 20 Nov 2026 09:00
62 lines
5453 bytes
Control: tags -1 moreinfo

On 12/11/26 11:26 pm, Nilesh Patra wrote:
> 
> 
> On 12/11/26 8:47 am, Stuart Prescott wrote:
>> Package: lintian
>> Version: 2.143.0
>> Severity: wishlist
>> X-Debbugs-Cc: stuart@debian.org
>>
>> Dear Maintainer,
>>
>> I've spotted a reasonable number of Python module packages that are
>> specifying Architecture: any when they are pure Python modules i.e.
>> they do not contain any compiled extensions, such as
>> /usr/lib/python3/dist-packages/MODULE/SOMETHING.cpython-XYY-x86_64-linux-gnu.so
>>
>> There is a small number of packages where the module includes something
>> about the host architecure in a config file or the package contains
>> other files that vary across architectures. The majority of pure Python
>> modules should be arch:all, regardless of any libraries that they use.
>>
>> I filed a couple of bugs against individual packages for this the other
>> day... and then realised that this is widespread enough to (a) scope the
>> problem more and (b) have lintian systematically look for the problem.
>>
>> The simplest heuristic for this would be:
>>
>> - if there are no .so files in the package (anywhere) then it should
>>   be an arch:all package
>>
>>   lintian's existing checks for arch-dependent files (such as used to
>>   evaluate /usr/share vs /usr/lib splits) could also be used to broaden
>>   the check.
>>
>> (This information is unambiguously in the dist-info/WHEEL file in modern
>> packaging, but we are unfortunately stripping the WHEEL file and its
>> metadata from the .deb with dh-python)
> 
> Is it ok to check fo `.so` in `/usr/lib/python3/dist-packages` instead of anywhere? That
> would make the check a little less broad and simpler.

I noticed that there is `package-contains-no-arch-dependent-files` which does that already.
It is however marked experimental.

My guess is this is because many packages have good reasons to add arch: any despite no arch
dep files.

https://udd.debian.org/lintian-tag/package-contains-no-arch-dependent-files?affected=yes

flags a large amount of rust packages for instance. If this does not apply to python modules,
I can have a new tag and emit it at info level for just python modules. Should this be done?

I've also CC'ed Helmut if they have suggestions on this.

Secondly, unrelated to the question - I see you filed #1153570 and #1153567 for beangulp and beanprice
which do not emit `package-contains-no-arch-dependent-files`. This is a bug in this check and I've
opened https://salsa.debian.org/lintian/lintian/-/merge_requests/837 to fix that.

Best,
Nilesh
Technical Details
Message-ID: <O1sDn-d3dB-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod
References: <NYtvX-blKt-1@gated-at.bofh.it> <NYtvX-blKt-1@gated-at.bofh.it> <NYHfz-btdn-5@gated-at.bofh.it> <NYtvX-blKt-1@gated-at.bofh.it> <NYHfz-btdn-5@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod
From: Nilesh Patra <nilesh@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1153794: lintian: warn that pure-python modules should normally be arch:all (not arch:any)
Date: Fri, 20 Nov 2026 10:00:01 +0100
Message-ID: <O1sDn-d3dB-1@gated-at.bofh.it>
References: <NYtvX-blKt-1@gated-at.bofh.it> <NYtvX-blKt-1@gated-at.bofh.it> <NYHfz-btdn-5@gated-at.bofh.it> <NYtvX-blKt-1@gated-at.bofh.it> <NYHfz-btdn-5@gated-at.bofh.it>
X-Original-To: Stuart Prescott <stuart@debian.org>, 1153794@bugs.debian.org
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Fri Nov 20 08:53:07 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.7
Reply-To: Nilesh Patra <nilesh@debian.org>, 1153794@bugs.debian.org, 1153794@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: lintian-maint@debian.org
X-Debian-Pr-Message: followup 1153794
X-Debian-Pr-Package: lintian
X-Debian-Pr-Source: lintian
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
Autocrypt: addr=nilesh@debian.org; keydata=
 xjMEYzwXMxYJKwYBBAHaRw8BAQdAsv3h7PxLm3vMbvdmN1bVnqUGyr3k2CKtdRmMDrX/jSXN
 IE5pbGVzaCBQYXRyYSA8bmlsZXNoQGRlYmlhbi5vcmc+wpAEExYIADgWIQSglbZu4JAkvuai
 8HIqJ5BL1yQ+2gUCYzwXMwIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRAqJ5BL1yQ+
 2hfuAQDBmH+Sec1bAb/BQNlnNOn7+o69yLi1S7bIQA67WpjCBwD9HoQ3dFMmHbDwu5Mi18z+
 0HoPHLKwQYWJCkOLn9vMFAHOOARjPBczEgorBgEEAZdVAQUBAQdAlnuvB8w06//G6pFqAo98
 IrNeskq+iLAbSPZ0Tse9zUIDAQgHwngEGBYIACAWIQSglbZu4JAkvuai8HIqJ5BL1yQ+2gUC
 YzwXMwIbDAAKCRAqJ5BL1yQ+2mzwAP0SR+JseZKh5BThCb5VijeJD2mCNhZFhvKYmlb8y6nb
 HwD/d3PmHHDDi6JR4oPGuYK/Z+j9tAiV5q8hGZilIFqfgQU=
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Debian-User: nilesh
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2003680
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 62
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: Helmut Grohne <helmut@subdivi.de>
X-Original-Date: Fri, 20 Nov 2026 14:21:19 +0530
X-Original-Message-ID: <9c17d51d-3680-4055-aaad-7d4058c99619@debian.org>
X-Original-References: <179445347764.1450317.9501816546772604563.reportbug@trochilus.nanonanonano.net> <179445347764.1450317.9501816546772604563.reportbug@trochilus.nanonanonano.net> <616e4f43-a6d4-4959-a22c-172e5b252c6a@debian.org> <179445347764.1450317.9501816546772604563.reportbug@trochilus.nanonanonano.net> <616e4f43-a6d4-4959-a22c-172e5b252c6a@debian.org>