From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R1sMK-0008H4-47 for garchives@archives.gentoo.org; Fri, 09 Sep 2011 04:06:32 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 823CE21C2CB; Fri, 9 Sep 2011 04:06:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 4F0FF21C0B8 for ; Fri, 9 Sep 2011 04:06:23 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B86E81B4023 for ; Fri, 9 Sep 2011 04:06:22 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id DE22180042 for ; Fri, 9 Sep 2011 04:06:21 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <58eb89592bfc3ac40ac0235ebcc52910b51a826c.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/getbinpkg.py X-VCS-Directories: pym/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 58eb89592bfc3ac40ac0235ebcc52910b51a826c Date: Fri, 9 Sep 2011 04:06:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 65dfb3c65659d3bf7fff681bee7cce18 commit: 58eb89592bfc3ac40ac0235ebcc52910b51a826c Author: Zac Medico gentoo org> AuthorDate: Fri Sep 9 04:05:58 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Sep 9 04:05:58 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D58eb8959 getbinpkg: fix old binhost protocol for python3 This will fix bug #382233. --- pym/portage/getbinpkg.py | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pym/portage/getbinpkg.py b/pym/portage/getbinpkg.py index 3e58672..579a46f 100644 --- a/pym/portage/getbinpkg.py +++ b/pym/portage/getbinpkg.py @@ -8,7 +8,9 @@ from portage.localization import _ import portage from portage import os from portage import _encodings +from portage import _unicode_decode from portage import _unicode_encode +from _emerge.Package import _all_metadata_keys =20 import sys import socket @@ -65,8 +67,15 @@ def make_metadata_dict(data): myid,myglob =3D data =09 mydict =3D {} - for x in portage.xpak.getindex_mem(myid): - mydict[x] =3D portage.xpak.getitem(data,x) + for k_bytes in portage.xpak.getindex_mem(myid): + k =3D _unicode_decode(k_bytes, + encoding=3D_encodings['repo.content'], errors=3D'replace') + if k not in _all_metadata_keys and \ + k !=3D "CATEGORY": + continue + v =3D _unicode_decode(portage.xpak.getitem(data, k_bytes), + encoding=3D_encodings['repo.content'], errors=3D'replace') + mydict[k] =3D v =20 return mydict =20 @@ -354,7 +363,7 @@ def dir_get_list(baseurl,conn=3DNone): =09 if page: parser =3D ParseLinks() - parser.feed(page) + parser.feed(_unicode_decode(page)) del page listing =3D parser.get_anchors() else: