Re: Bug#624769: lsb-release: wrong output on debian-ports architectures breaks other packages
Didier Raboud <[email protected]>
| Newsgroups | gmane.linux.debian.devel.lsb |
|---|---|
| Organization | EPFL - GR-KA |
| Message-ID | <[email protected]> |
tags 624769 +patch thanks Le 24.02.2012 19:49, Thorsten Glaser a écrit : >> does the attached patch on lsb_release.py fix this bug ? > > Sorry, it doesn’t. Eh, don't be sorry ! And does that one (cleaner, IMHO) help now ? It should at least allow the apt-cache policy 'Debian Ports' release line go further down the processing. Cheers, OdyX
fix_624769.patch
(text/plain, 1.6 KB)
From ab7965c476c124e4af8194e0c01cba92c76ad1ed Mon Sep 17 00:00:00 2001 From: Didier Raboud <[email protected]> Date: Mon, 27 Feb 2012 14:53:50 +0100 Subject: [PATCH] Recognise Debian Ports as `sid` too. This extends the interface of guess_release_from_apt to accept new origin - label pairs, with a default to accept 'Debian Ports': 'ftp.debian-ports.org' at least. Closes: #624769 Reported-by: Thorsten Glaser <[email protected]> Signed-off-by: Didier Raboud <[email protected]> --- lsb_release.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lsb_release.py b/lsb_release.py index d65e933..7979f21 100644 --- a/lsb_release.py +++ b/lsb_release.py @@ -166,7 +166,8 @@ def parse_apt_policy(): def guess_release_from_apt(origin='Debian', component='main', ignoresuites=('experimental'), - label='Debian'): + label='Debian', + alternate_olabels={'Debian Ports':'ftp.debian-ports.org'}): releases = parse_apt_policy() if not releases: @@ -176,7 +177,9 @@ def guess_release_from_apt(origin='Debian', component='main', releases = [x for x in releases if ( x[1].get('origin', '') == origin and x[1].get('component', '') == component and - x[1].get('label', '') == label)] + x[1].get('label', '') == label) or ( + x[1].get('origin', '') in alternate_olabels and + x[1].get('label', '') == alternate_olabels.get(x[1].get('origin', '')))] # Check again to make sure we didn't wipe out all of the releases if not releases: -- 1.7.2.5
signature.asc
(application/pgp-signature, 663 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (MingW32) iQGcBAEBAgAGBQJPS5nlAAoJEIvPpx7KFjRVR0QL/3RCZXpPVxdTqA2a+D/lz353 2zkyywycXJfedfirb1w+a9xfI4VEiZcL+fkQZY+oR5hiki44Np/O/gd0shFQMZTC Bh+AuykXVsI93kEYedTp+0onz7WmOdxiAdwKzudrJPc0f9IS5ftez6ntuM7391cv iXOoAIw2hlMBytaEkIuEnVkXfQm8op0MmqopHhala+OeGt8Bre2X++Chdz6qyHqn chi6NxMX4zJPiA4T7zirQaH0WgdL2WHbsQ2Wz5uzEwLaEeiOo5MDPTx33qGztIFZ PzF8vKLkr8QtL09WvA+zwN1mCpB+GkJd5nGCgNn9Mct7jedSf2zqCzTrR4gtUPJW mzoPqd98lNx4EQLxKXzTqhg+TL1lEa4He1zNZq3brh+ZboTn2ppsLxVUNRgzcNYb wJ8OKzhfD3/Qg0QGzKQjIJGid/9K0imiPNh9YCWv8zn1FCSxPblimMpLMoallcZC SPD3D63nPR/jCl6Ew/r7cJVOhap/phezql6lw5Dg+Q== =cMll -----END PGP SIGNATURE-----