Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r14147 - main/branches/prefix/pym/portage/dbapi
Date: Mon, 24 Aug 2009 09:49:05
Message-Id: E1MfWAh-0003BO-2X@stork.gentoo.org
1 Author: grobian
2 Date: 2009-08-24 09:49:02 +0000 (Mon, 24 Aug 2009)
3 New Revision: 14147
4
5 Modified:
6 main/branches/prefix/pym/portage/dbapi/vartree.py
7 Log:
8 port LinkageMap encoding fix to LinkageMapMachO
9
10 Modified: main/branches/prefix/pym/portage/dbapi/vartree.py
11 ===================================================================
12 --- main/branches/prefix/pym/portage/dbapi/vartree.py 2009-08-24 09:44:30 UTC (rev 14146)
13 +++ main/branches/prefix/pym/portage/dbapi/vartree.py 2009-08-24 09:49:02 UTC (rev 14147)
14 @@ -837,6 +837,24 @@
15 2. realpath of object if object does not exist.
16
17 """
18 +
19 + os = _os_merge
20 +
21 + try:
22 + _unicode_encode(obj,
23 + encoding=_encodings['merge'], errors='strict')
24 + except UnicodeEncodeError:
25 + # The package appears to have been merged with a
26 + # different value of sys.getfilesystemencoding(),
27 + # so fall back to utf_8 if appropriate.
28 + try:
29 + _unicode_encode(obj,
30 + encoding=_encodings['fs'], errors='strict')
31 + except UnicodeEncodeError:
32 + pass
33 + else:
34 + os = portage.os
35 +
36 abs_path = os.path.join(root, obj.lstrip(os.path.sep))
37 try:
38 object_stat = os.stat(abs_path)