glasscat ~ # emerge -uDNpv !!! Error fetching binhost package info from 'http://internal.server/i686-x86/' !!! HTTP Error 404: Not Found Fetching bininfo from http://internal.server/i686-x86/ Traceback (most recent call last): File "/usr/bin/emerge", line 43, in <module> retval = emerge_main() File "/usr/lib/portage/pym/_emerge/main.py", line 1644, in emerge_main getbinpkgs="--getbinpkg" in myopts) File "/usr/lib/portage/pym/portage/dbapi/bintree.py", line 526, in populate self._populate(getbinpkgs) File "/usr/lib/portage/pym/portage/dbapi/bintree.py", line 940, in _populate base_url, chunk_size=chunk_size) File "/usr/lib/portage/pym/portage/getbinpkg.py", line 565, in dir_get_metadata filelist = dir_get_list(baseurl, conn) File "/usr/lib/portage/pym/portage/getbinpkg.py", line 357, in dir_get_list parser.feed(page) File "/usr/lib/python3.2/html/parser.py", line 132, in feed self.rawdata = self.rawdata + data TypeError: Can't convert 'bytes' object to str implicitly glasscat ~ # Reproducible: Always shorthand fix: --- /usr/lib/portage/pym/portage/getbinpkg.py.orig 2011-09-03 04:21:14.746443972 -0400 +++ /usr/lib/portage/pym/portage/getbinpkg.py 2011-09-08 03:01:57.287674953 -0400 @@ -292,8 +292,13 @@ if dest: dest.write(response.read()) return "",0,"" + + # portage likes strings + resp = response.read() + if isinstance(resp, bytes): + resp=str(resp, encoding='latin-1') - return response.read(),0,"" + return resp,0,"" def match_in_array(array, prefix="", suffix="", match_both=1, allow_overlap=0):
Created attachment 285827 [details, diff] bytes to str fix patch to check if response is bytes and convert it to str, against sys-apps/portage-2.2.0_alpha52
Thanks, this is fixed in git: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=58eb89592bfc3ac40ac0235ebcc52910b51a826c Please note that this fix is for the legacy binhost protocol which only applies when the $PORTAGE_BINHOST/Packages file is not fetchable. In order to use the newer protocol, you need to share $PKGDIR such that $PORTAGE_BINHOST/Packages can be fetched by clients.
This is fixed in 2.1.10.15 and 2.2.0_alpha55.