summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-14 21:19:04 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-14 21:19:04 +0000
commitdbe2b392c277eb9e64d111a5947223dc391f56e4 (patch)
treeb8693cc24be77f8963b75e5f902135824c03bb69
parent11e2614650f79d972668d9b7b740082e82f6b942 (diff)
downloadportage-dbe2b392c277eb9e64d111a5947223dc391f56e4.tar.gz
portage-dbe2b392c277eb9e64d111a5947223dc391f56e4.tar.bz2
portage-dbe2b392c277eb9e64d111a5947223dc391f56e4.zip
In dblink._unmerge_pkgfiles(), if the package appears to have been merged
with a different value of sys.getfilesystemencoding(), fall back to utf_8 if appropriate. svn path=/main/trunk/; revision=14049
-rw-r--r--pym/portage/dbapi/vartree.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index d0a389ee5..10e48fc19 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -2376,6 +2376,20 @@ class dblink(object):
scheduler.scheduleYield()
obj = normalize_path(objkey)
+ if os is _os_merge:
+ try:
+ _unicode_encode(obj, encoding=_merge_encoding, errors='strict')
+ except UnicodeEncodeError:
+ # The package appears to have been merged with a
+ # different value of sys.getfilesystemencoding(),
+ # so fall back to utf_8 if appropriate.
+ try:
+ _unicode_encode(obj, encoding='utf_8', errors='strict')
+ except UnicodeEncodeError:
+ pass
+ else:
+ os = portage.os
+
file_data = pkgfiles[objkey]
file_type = file_data[0]
statobj = None