debian/control: fix xen-utils-4.14 python3 dependency
authorHans van Kranenburg <hans@knorrie.org>
Sun, 6 Sep 2020 23:20:37 +0000 (01:20 +0200)
committerHans van Kranenburg <hans@knorrie.org>
Fri, 18 Sep 2020 16:29:59 +0000 (18:29 +0200)
Lintian complains:

    E: xen-utils-4.14: python-script-but-no-python-dep usr/lib/xen-4.14/bin/convert-legacy-stream #!/usr/bin/python3
    N:
    N:    Packages with Python scripts should depend on the package python. Those
    N:    with scripts that specify a specific version of Python must depend,
    N:    recommend or suggest on that version of Python (exactly).
    N:
    N:    For example, if a script in the package uses #!/usr/bin/python, the
    N:    package needs a dependency on python. If a script uses
    N:    #!/usr/bin/python2.6, the package needs a dependency on python2.6. A
    N:    dependency on python (>= 2.6) is not correct, since later versions of
    N:    Python may not provide the /usr/bin/python2.6 binary.
    N:
    N:    If you are using debhelper, adding ${python3:Depends} or
    N:    ${python:Depends} to the Depends field and ensuring dh_python2 or
    N:    dh_python3 are run during the build should take care of adding the
    N:    correct dependency.
    N:
    N:    In some cases a weaker relationship, such as Suggests or Recommends,
    N:    will be more appropriate.
    N:
    N:    Severity: error
    N:
    N:    Check: scripts
    N:
    E: xen-utils-4.14: python-script-but-no-python-dep usr/lib/xen-4.14/bin/pygrub #!/usr/bin/python3
    E: xen-utils-4.14: python-script-but-no-python-dep usr/lib/xen-4.14/bin/verify-stream-v2 #!/usr/bin/python3
    E: xen-utils-4.14: python-script-but-no-python-dep usr/lib/xen-4.14/bin/xenpvnetboot #!/usr/bin/python3

The xen-utils-4.14 is indeed missing the python3 dependency. This is
probably because of the dh_python3 override that makes it skip dealing
with the ${python3:Depends} dependency:

    # dh_python3 does not know to look in the funny directory where
    # we put the versioned /usr/lib files including some python scripts.
    override_dh_python3:
    dh_python3
    dh_python3 -pxen-utils-$(upstream_version) \
    usr/lib/xen-$(upstream_version)/bin

So, just hardcode python3 as dependency, yolo.

Signed-off-by: Hans van Kranenburg <hans@knorrie.org>
debian/control

index 0aa9b2cad3a846d44404c9673216b886de3e94e6..ca54be9c0f06359a255c47b72df11030ca6cf383 100644 (file)
@@ -100,7 +100,7 @@ Package: xen-utils-4.14
 Section: admin
 Architecture: amd64 arm64 armhf i386
 Provides: xen-utils
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, xen-utils-common (>= ${source:Version})
+Depends: ${shlibs:Depends}, ${misc:Depends}, python3, xen-utils-common (>= ${source:Version})
 Recommends: bridge-utils, libc6-xen [i386], xen-hypervisor-4.14, qemu-system-x86, grub-xen-host [i386 amd64]
 Suggests: qemu-utils [i386 amd64], seabios [i386 amd64], ovmf
 Description: XEN administrative tools