[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#965947: lintian: uses-dpkg-database-directly no longer detected for python3-reportbug



Control: lintian: Extract string constants from interpreter scripts and modules

Hi Nis,

On Sat, Sep 4, 2021 at 7:21 AM Nis Martensen <nis.martensen@web.de> wrote:
>
> The content of the python module files is not checked.

Sorry I took so long. Your bug is real, but I am not clear about the
best solution.

The change in behavior was probably introduced when I rewrote the file
indices to reside in memory. Among other things, I made the code more
"literate" in the sense that routines now have names that resemble
more closely what they do. Twenty-two years of collective patching had
led to a bit of a jumble.

>From other, more prominent parts of the code I had decided that
scripts were executable files with a hashbang. We devote a whole check
to them. It is called 'scripts'.

For your package python3-reportbug, the change resulted in a loss of
functionality. I am not sure, however, that the best fix is to simply
add *.py files—without an executable flag or a hashbang—to the
definition of a script.

For ELF executables, Lintian looks at the equivalent of 'nm' strings.
It is not perfect but avoids confusion with documentation or code
comments.

We struggle with the issue of script parsing in other parts of
Lintian, too. (See open bugs.) For this bug, I would really like to
use a Python parser that extracts string constants from Python modules
under /usr/lib/python3/dist-packages/. I would also like to find
similar solutions for other scripting languages—especially for Perl.

Thank you for your diligent maintainership, and especially for this report!

Kind regards
Felix Lechner


Reply to: