Bug#719063: lsb-release: should support python3
Alexandre Detiste <[email protected]> Thu, 16 Jul 2015 17:45:49 +0200
| Newsgroups | gmane.linux.debian.devel.lsb |
|---|---|
| Message-ID | <2056804.7kgU0ityKn@antec> |
Le mardi 14 juillet 2015, 11:07:57 Didier 'OdyX' Raboud a écrit :
> Control: tag -1 +moreinfo
>
> Le lundi, 1 juin 2015, 12.00:21 Alexandre Detiste a écrit :
> > Here is a patch that has got some review from "Python3 porting devel" team.
Hi, this port should be really straightforward; because this package
has already been built as a Python3 package for years in Ubuntu.
(see 2to3 & sed magic in override_dh_install)
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/lsb/wily/view/head:/debian/rules
> Great, thanks. I'll make sure to include it in the next upload. That said, I
> just tested it, and I get the following error when launching
> /usr/bin/lsb_release:
Can you provide me the output of "apt-cache policy" ?
This change would likely fix it, but then the test suite complains.
I think the current behaviour where random strings
got compared against index number doesn't make sense anyway.
Can you test it ?
--- a/lsb_release.py
+++ b/lsb_release.py
@@ -185,13 +185,13 @@ def parse_policy_line(data):
def release_index(x):
suite = x[1].get('suite')
if suite:
if suite in RELEASES_ORDER:
return int(len(RELEASES_ORDER) - RELEASES_ORDER.index(suite))
else:
- return suite
+ try:
+ return float(suite)
+ except ValueError:
+ return 0
return 0
Cheers,
Alexandre Detiste
signature.asc
(application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJVp9G5AAoJEDHzFEVEoXQaRAgP/0r7AOT94WzpczF96R0bXoN1 rOq04s3Ya3xkCVMarGfoOYcxVy6amj9wdl4ZGX/und+9rdZPm1Aqdoqw2vSOCQpg BlFJhxxdNboMKQLmjrOTzGrNc+buqFZCIyi92YXHhBpweFkbhWPWbbAkqGqR37By CNa8ZacGeKFNzg9K01d46gqMkYG7d1O0x+inLNcCD4M6K2xu3WoJBUV9/9aSBgX1 AJi8euDtp8aVJ+XpG5Jd5sMLfPzzI+Lj78P+iuApGnsa6lDkJDLQOzfl4uofZMEc 7ISqloHGRllVTeXpipvRcfiQftzE5bdgRBszvug5FybKnOra7bcVucWZExNw05Sk A9oXS8Iqj+zxuK8na5tM5cLY49ucLY++57SMzokbvE4slzZQrCZhPHgru6Plsj5Q r+iWfiWw8mA2Q2z6nUpTZe7YjExc+fuOJ5Z8YFvHJ+cWq7lQlLejLg5F+31vRmrS iTL0dKyg9vW6uPxM6ckwjtaevL7zGRYgBE6Q3Ye73YQ96HFkG2eodkMId78pc9AN mxJRvIDUjaNYEl0l5IUyqivB5hTVK7jcV/br5AUREN7Nf/npyr8u/x9sJvVYXFNm bvOedve3PCf5ecNtWaAsqsdfxYmiZdlQHMsa3jswISYJZ0wGdoV2mmT/Q6SS4s+2 z93gWoY0S9Pfzop+m691 =FJf3 -----END PGP SIGNATURE-----