Bug#743599: lintian: false positive python-script-but-no-python-dep when using #!/usr/bin/python2
Control: tags -1 -patch
Hi,
Thanks for the provided patches.
On Mon, 07 Nov 2016 17:16:24 +0100 Antonio Ospite <ao2@ao2.it> wrote:
> [...]
>
> Hi Luca,
>
> I also ran into this issue when packaging git-bz
> (http://fishsoup.net/software/git-bz/).
>
> When using dh_python2 (in my case with no specific python version in
> debian/control) the package ends up depending on pyhton:any, and lintian does
> not know that python:any is OK as a dependency for scripts using python2 in
> the shebang line.
>
> Your patch fixes this but AFAICS makes lintian emit an unnecessary warning:
>
> W: scripts: unusual-interpreter usr/bin/script_name #!python2
>
> Maybe this is a better fix:
>
> [...]
>
> The rationale is that even if there is a 2 in the interpreter name, it
> requires _unversioned_ dependencies.
>
> See the attached patches to follow my analysis of the problem.
>
> Thanks,
> Antonio
>
> [...]
I have applied the changes to the test case. However, the changes to
the data files (regardless of which one I apply) cause a test regression
there after AFAICT.
The test failure is:
> $ t/runtests -k -j1 t debian/test-out legacy-scripts
> ENV[PATH]=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
> tests::legacy-scripts: diff -u t/tests/legacy-scripts/tags [...]/tests/scripts/tags.scripts
> --- t/tests/legacy-scripts/tags 2016-11-29 20:42:28.674312854 +0000
> +++ [...]/tests/scripts/tags.scripts 2016-11-29 20:50:22.238324980 +0000
> @@ -13,11 +13,11 @@
> E: scripts: init.d-script-needs-depends-on-lsb-base etc/init.d/skeleton (line 40)
> E: scripts: missing-dep-for-interpreter jruby => jruby | jruby1.0 | jruby1.1 | jruby1.2 (usr/bin/jruby-broken)
> E: scripts: missing-dep-for-interpreter lefty => graphviz (usr/bin/lefty-foo)
> +E: scripts: missing-dep-for-interpreter python2 => python:any | python-minimal:any (usr/bin/py2foo)
> E: scripts: package-installs-python-bytecode usr/lib/python2.3/site-packages/test.pyc
> E: scripts: php-script-but-no-phpX-cli-dep usr/share/scripts/php5foo
> E: scripts: php-script-but-no-phpX-cli-dep usr/share/scripts/phpfoo
> E: scripts: python-script-but-no-python-dep usr/bin/py2.Xfoo
> -E: scripts: python-script-but-no-python-dep usr/bin/py2foo
> E: scripts: python-script-but-no-python-dep usr/bin/pyfoo
> E: scripts: shell-script-fails-syntax-check usr/bin/sh-broken
> E: scripts: wrong-path-for-interpreter usr/bin/lefty-foo (#!/usr/local/bin/lefty != /usr/bin/lefty)
> fail tests::legacy-scripts: output differs!
I don't think that change was intentional, so I am sending the patch
back for another review.
Thanks,
~Niels
Reply to: