Bug#675618: lsb-release: cannot handle non-ASCII characters from Apt policy
Didier Raboud <[email protected]>
| Newsgroups | gmane.linux.debian.devel.lsb |
|---|---|
| Organization | Debian - The Universal OS |
| Message-ID | <[email protected]> |
tags 675618 +pending
thanks
Le samedi, 2 juin 2012 16.31:36, vous avez écrit :
> Package: lsb-release
> Version: 4.1+Debian5
> Severity: normal
>
> lsb_release fails for me with the following error:
>
> File "/usr/lib/python2.7/dist-packages/lsb_release.py", line 208, in
> parse_apt_policy close_fds=True).communicate()[0].decode('ascii')
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1325:
> ordinal not in range(128)
>
> This is due to my personal repo having non-ASCII characters in its
> (UTF-8-encoded) Release file, which shows up in the Apt policy:
>
> $ apt-cache policy | sed -n '34,36p'
> 500 http://www.fbriere.net/debian/ unstable/misc i386 Packages
> release o=Frédéric Brière,a=unstable,n=sid,c=misc
> origin www.fbriere.net
>
>
> I couldn't find any documentation about restricting Release files to
> ASCII (not that it says much, given how undocumented Release files are),
> so I assume that all of Unicode is acceptable in this context.
Indeed.
I have pushed the two following commits to the packaging repository [0]:
3ed2841 Add test case for #675618.
8cdec4e Accept utf-8 in `apt-cache policy` and `dpkg-query` outputs.
It will be part of the next upload, hence +pending.
Cheers, and thanks for your bugreport.
OdyX
[0] http://anonscm.debian.org/gitweb/?p=collab-maint/lsb.git
signature.asc
(application/pgp-signature, 665 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQGcBAABCAAGBQJPzP3RAAoJEIvPpx7KFjRVLHcL/0kUEXLC3xYsptBE2EuRx9N/ kCFe/6uTexCIrhqTY45szXtgatelfatwk7XTi/eCX6xTBaX0IZruLvpdX/t8XVnW ioy61wogH7cVoh5sIUNV96YjslKIUiLWbIsB1QZNnaQErSk+ITWSILII7OU8sy+T bGKVJCpQIEqOpNGChEtWVa+XNG8p0MJveM48xo06t8bZn5xeEW1FYdhSqNAumtbO UgYWGMfY4Zqr8fyfgTVammgs85OzRk18Pq1JRGsADsXBlIUBd3gCShNdj2t/sQDq /UNMEg8GgccQDrcvpLktkmju16cGcF3H8ykgw8SWtTgBDDsF9HW9dDAV6+LEPzfv 9wOdedr9BwUVuZ1xcHRP+TjciMEwHvILe40d4cEPNVUdY87tlW7aCNldK3BBIFOu JhABXJTBXg8FJ5477if22E0irAz5DG/zV+15l2CRVeA0s9eMvhXFO9hA2Ppo3xkc 2a+3LFntzKwiayO8d8zKiaqRvMgj3fG1sZagYS3WyA== =pKWq -----END PGP SIGNATURE-----