On Tue, 2026-09-22 at 20:19 +0530, Nilesh Patra wrote:
> Hi,
> 
> On 22/09/26 7:11 pm, Benjamin Drung wrote:
> > Package: lintian
> > Version: 2.139.0
> > Severity: normal
> > X-Debbugs-Cc: [email protected]
> > 
> > Dear Maintainer,
> > 
> > I saw this lintian complaint on rust-sudo-rs on Ubuntu:
> > 
> > E: sudo-rs: python3-script-but-no-python3-dep /usr/bin/python3 (does not 
> > satisfy python3:any | python3-minimal:any) 
> > [usr/share/apport/package-hooks/source_rust-sudo-rs.py]
> > 
> > This is a false positive IMO. Packages can ship Apport hooks that are
> > Python 3 scripts. But they will only be used by Apport (which depends on
> > Python).
> > 
> > So please ignore Python files in /usr/share/apport/package-hooks.
> 
> In this case, the tag may have some merit, though. That tag is emitted in 
> cases where the script is executable file. I downloaded the package for 
> ubuntu and
> can see the same
> 
> $ dpkg -c sudo-rs_0.2.13-0ubuntu1.2_amd64.deb | grep apport
> drwxr-xr-x root/root         0 2026-08-27 10:15 ./usr/share/apport/
> drwxr-xr-x root/root         0 2026-08-27 10:15 
> ./usr/share/apport/package-hooks/
> -rwxr-xr-x root/root      1331 2026-07-09 09:35 
> ./usr/share/apport/package-hooks/source_rust-sudo-rs.py
> 
> I haven't used apport (it probably is more of an ubuntu thing?) but in almost 
> all packages that I looked for apport hooks, I don't see the hook files to be
> executable.

Good point. The hook is sourced by Apport and does not need to be
executable. I uploaded rust-sudo-rs 0.2.14-1ubuntu4 where it is removed.

> Would one still expect this tag to not be emitted in case they have 
> executable hooks? If so, I have a tiny patch and I can quickly merge it to 
> skip dependency
> relation checks for apport/packages-hooks.

So keeping the tag makes sense to me. Could we update the help text to
mention the alternative solution to not make the script executable (and
mention Apport hooks as one example for this)?

-- 
Benjamin Drung
Debian & Ubuntu Developer

Reply via email to