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

Bug#818609: lintian: python-script-but-no-python-dep false positive



On Fri, 06 Apr 2018 11:53:25 +0100
Chris Lamb <lamby@debian.org> wrote:

> tags 818609 + moreinfo
> thanks
> 
> Chris Lamb wrote:
> 
> > > $ lintian weboob_1.3-1_all.deb
> > > E: weboob: python-script-but-no-python-dep
> > > usr/share/weboob/imm-o-matic  
> > 
> > I believe you are missing a dependency on Python 3 for this
> > script.   
> […]
> > https://anonscm.debian.org/git/lintian/lintian.git/commit/?id=8385bfa725a324d8591343179e0207d72aec9511  
> 
> Neil, is this the cause of your issue too? My lava-server packages
> here don't seem to have render-template.py (or I'm missing something
> obvious!)

Upstream have since moved on to exclusive Python3 support but lintian
is still getting this wrong. Before the following change, yes, lintian
spots these files:

neil@sylvester:lava-server (master)$ git diff
diff --git a/share/download-test-suites-api.py b/share/download-test-suites-api.py
index 96ffe1a8..43b319b2 100755
--- a/share/download-test-suites-api.py
+++ b/share/download-test-suites-api.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 #
 #  download-test-suites-api.py
diff --git a/share/render-template.py b/share/render-template.py
index 011745cf..ffad2879 100755
--- a/share/render-template.py
+++ b/share/render-template.py
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/python3
 
 """
 This script is particularly intended for those adding new devices to LAVA
diff --git a/share/validate_devices.py b/share/validate_devices.py
index fd53b808..b65cf25e 100755
--- a/share/validate_devices.py
+++ b/share/validate_devices.py
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/python3
 
 """
 This script is to check the combination of the Jinja2 device-type templates

After building with these changes, lintian gets it wrong:

neil@sylvester:lava-server (master)$ lintian -o /tmp/tmp.WrhJ2TmpXH/lava-dev_2018.2+7171.458f470e-1_all.deb
W: lava-dev: binary-package-depends-on-toolchain-package depends: debhelper (>= 9.20160709)
E: lava-dev: python-script-but-no-python-dep usr/share/lava-server/download-test-suites-api.py
E: lava-dev: python-script-but-no-python-dep usr/share/lava-server/render-template.py
E: lava-dev: python-script-but-no-python-dep usr/share/lava-server/validate_devices.py

$ dpkg -I /tmp/tmp.WrhJ2TmpXH/lava-dev_2018.2+7171.458f470e-1_all.deb|grep Depends
 Depends: build-essential, ca-certificates, devscripts, dpkg-dev,
 debootstrap (>= 1.0.86), debhelper (>= 9.20160709), fakeroot, git,
 libdistro-info-perl, node-uglify, libjs-excanvas, libjs-jquery-cookie,
 libjs-jquery, libjs-jquery-watermark, libjs-jquery-flot (>= 0.8.2),
 libjs-jquery-ui, python3 | python3-all | python3-dev |
 python3-all-dev, python3-setuptools, python3-dateutil,
 python3-guestfs, python3-nose, python3-netifaces, python3-pexpect (>=
 4.2), pep8 | python3-pep8, python3-sphinx (>= 1.4),
 python3-sphinx-bootstrap-theme, python3-requests, python3-zmq,
 python3-yaml, python3-voluptuous (>= 0.8.8), docbook-xsl, xsltproc

If you have time to reproduce, we have a build script helper. Install
lava-dev (in chroot or wherever), git clone
http://git.linaro.org/lava/lava-server.git , cd lava-server then:

$ /usr/share/lava-server/debian-dev-build.sh -p lava-server

Is it something to do with the scripts being in /usr/share ?
dh_python3 doesn't notice files in /usr/share

$ dpkg-query -W lintian
lintian	2.5.80

I'll be putting the above git diff into review today, so the master
branch will likely have this change soon. However, the upstream helper
script builds whatever is in the git working tree, without fussing
about uncommitted changes like git-bp.

> 
> 
> Best wishes,
> 
> -- 
>       ,''`.
>      : :'  :     Chris Lamb
>      `. `'`      lamby@debian.org / chris-lamb.co.uk
>        `-


-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgp5yHaTeGkKH.pgp
Description: OpenPGP digital signature


Reply to: