From: Zac Medico Date: Fri, 14 Aug 2009 21:19:04 +0000 (-0000) Subject: In dblink._unmerge_pkgfiles(), if the package appears to have been merged X-Git-Tag: v2.2_rc39~72 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dbe2b392c277eb9e64d111a5947223dc391f56e4;p=portage.git 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 --- 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