Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 200120 Details for
Bug 280259
sys-apps/portage-2.2_rc35 UnicodeDecodeError with --buildpkg or quickpkg
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix the UnicodeDecodeError
unicode_packages.patch (text/plain), 2.80 KB, created by
Zac Medico
on 2009-08-04 07:41:37 UTC
(
hide
)
Description:
Fix the UnicodeDecodeError
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2009-08-04 07:41:37 UTC
Size:
2.80 KB
patch
obsolete
>Index: pym/portage/dbapi/bintree.py >=================================================================== >--- pym/portage/dbapi/bintree.py (revision 13888) >+++ pym/portage/dbapi/bintree.py (revision 13891) >@@ -21,6 +21,7 @@ > > from portage import dep_expand, listdir, _check_distfile, _movefile > >+import codecs > import os, errno, stat > import re > from itertools import chain, izip >@@ -429,18 +430,8 @@ > dirs.remove("All") > dirs.sort() > dirs.insert(0, "All") >- pkgindex = self._new_pkgindex() >+ pkgindex = self._load_pkgindex() > pf_index = None >- try: >- f = open(self._pkgindex_file) >- except EnvironmentError: >- pass >- else: >- try: >- pkgindex.read(f) >- finally: >- f.close() >- del f > if not self._pkgindex_version_supported(pkgindex): > pkgindex = self._new_pkgindex() > header = pkgindex.header >@@ -646,7 +637,8 @@ > urldata[1] + urldata[2], "Packages") > pkgindex = self._new_pkgindex() > try: >- f = open(pkgindex_file) >+ f = codecs.open(pkgindex_file, >+ encoding='utf_8', errors='replace') > try: > pkgindex.read(f) > finally: >@@ -845,17 +837,8 @@ > self.getname(cpv).split(os.path.sep)[-2] == "All": > self._create_symlink(cpv) > created_symlink = True >- pkgindex = self._new_pkgindex() >- try: >- f = open(self._pkgindex_file) >- except EnvironmentError: >- pass >- else: >- try: >- pkgindex.read(f) >- finally: >- f.close() >- del f >+ pkgindex = self._load_pkgindex() >+ > if not self._pkgindex_version_supported(pkgindex): > pkgindex = self._new_pkgindex() > >@@ -1096,7 +1079,8 @@ > def _load_pkgindex(self): > pkgindex = self._new_pkgindex() > try: >- f = open(self._pkgindex_file) >+ f = codecs.open(self._pkgindex_file, >+ encoding='utf8', errors='replace') > except EnvironmentError: > pass > else: >Index: bin/emaint >=================================================================== >--- bin/emaint (revision 13888) >+++ bin/emaint (revision 13891) >@@ -116,13 +116,8 @@ > myroot = portage.settings["ROOT"] > self._bintree = portage.db[myroot]["bintree"] > self._bintree.populate() >- self._pkgindex_file = os.path.join(self._bintree.pkgdir, "Packages") >- self._pkgindex = self._bintree._new_pkgindex() >- f = open(self._pkgindex_file, 'r') >- try: >- self._pkgindex.read(f) >- finally: >- f.close() >+ self._pkgindex_file = self._bintree._pkgindex_file >+ self._pkgindex = self._bintree._load_pkgindex() > > def check(self, onProgress=None): > missing = [] >@@ -178,13 +173,8 @@ > cpv_all = self._bintree.dbapi.cpv_all() > cpv_all.sort() > >- pkgindex = bintree._new_pkgindex() >+ pkgindex = bintree._load_pkgindex() > self._pkgindex = pkgindex >- f = open(self._pkgindex_file, 'r') >- try: >- self._pkgindex.read(f) >- finally: >- f.close() > > metadata = {} > for d in pkgindex.packages:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 280259
:
200116
| 200120