On Sun, Jan 15, 2017 at 09:38:18PM +0000, Holger Levsen wrote:
> how strange, as the code from a9219384 explicitly tests this:
>
> (status, output) = run(["dpkg-query", "-f", "${Version}\n", "-W",
> "apt"], ignore_errors=True)
> apt_can_install_debs = LooseVersion(output.strip()) >=
> LooseVersion("1.1")
Thank you for CCing me on this.
I tested LooseVersion with the version of apt in wheezy:
iris ~ % python
Python 2.7.13rc1 (default, Dec 4 2016, 14:12:39)
[GCC 6.2.1 20161124] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from distutils.version import LooseVersion
>>> LooseVersion("0.9.7.9+deb7u7") >= LooseVersion("1.1")
False
So LooseVersion can handle the version number. Possibly dpkg-query is
behaving differently on wheezy? Perhaps you could run that dpkg-query
command on wheezy and see what you get.
--
Sean Whitton
signature.asc
Description: PGP signature

