[Piuparts-devel] Bug#851517: piuparts uses apt --allow-downgrades even if it should not

Sean Whitton spwhitton at spwhitton.name
Sun Jan 15 22:07:07 UTC 2017


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/piuparts-devel/attachments/20170115/bd3575d8/attachment.sig>


More information about the Piuparts-devel mailing list