Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r14178 - in main/branches/prefix: bin man pym/portage/cache pym/repoman
Date: Tue, 01 Sep 2009 12:14:25
Message-Id: E1MiX4Y-0005kw-VK@stork.gentoo.org
1 Author: grobian
2 Date: 2009-09-01 17:23:10 +0000 (Tue, 01 Sep 2009)
3 New Revision: 14178
4
5 Modified:
6 main/branches/prefix/bin/repoman
7 main/branches/prefix/man/portage.5
8 main/branches/prefix/pym/portage/cache/sqlite.py
9 main/branches/prefix/pym/repoman/utilities.py
10 Log:
11 Merged from trunk -r14170:14176
12
13 | 14171 | Bug #283223 - Don't call str() inside _db_escape_string(), |
14 | zmedico | since it's redundant and it can trigger a |
15 | | UnicodeEncodeError in python-2.x. |
16
17 | 14172 | Bug #283223 - Don't call str() on unicode strings inside |
18 | zmedico | _db_escape_string(), since it can trigger a |
19 | | UnicodeEncodeError in python-2.x. |
20
21 | 14173 | Fix broken indentation from previous commits. |
22 | zmedico | |
23
24 | 14174 | Bug #283292 - Fix FindPortdir() to prevent OSError: [Errno |
25 | zmedico | 2] from stat when $PWD is unset. Thanks to Jonathan Callen |
26 | | <en.ABCD@×××××.com> for this patch. |
27
28 | 14175 | Add dev-util/gperf to list of suspected run-time |
29 | arfrever | dependencies (bug #283357). |
30
31 | 14176 | Remove reference to GRP_STAGE23_USE (bug #283358). |
32 | arfrever | |
33
34
35 Modified: main/branches/prefix/bin/repoman
36 ===================================================================
37 --- main/branches/prefix/bin/repoman 2009-09-01 17:20:21 UTC (rev 14177)
38 +++ main/branches/prefix/bin/repoman 2009-09-01 17:23:10 UTC (rev 14178)
39 @@ -406,6 +406,7 @@
40 "dev-util/byacc",
41 "dev-util/cmake",
42 "dev-util/ftjam",
43 + "dev-util/gperf",
44 "dev-util/gtk-doc",
45 "dev-util/gtk-doc-am",
46 "dev-util/intltool",
47
48 Modified: main/branches/prefix/man/portage.5
49 ===================================================================
50 --- main/branches/prefix/man/portage.5 2009-09-01 17:20:21 UTC (rev 14177)
51 +++ main/branches/prefix/man/portage.5 2009-09-01 17:23:10 UTC (rev 14178)
52 @@ -204,9 +204,6 @@
53 .TP
54 .BR STAGE1_USE
55 Special USE flags which may be needed when bootstrapping from stage1 to stage2.
56 -.TP
57 -.BR GRP_STAGE23_USE
58 -Special USE flags used by catalyst for building a stage3 and GRP sets.
59 .RE
60 .PD 1
61 .TP
62
63 Modified: main/branches/prefix/pym/portage/cache/sqlite.py
64 ===================================================================
65 --- main/branches/prefix/pym/portage/cache/sqlite.py 2009-09-01 17:20:21 UTC (rev 14177)
66 +++ main/branches/prefix/pym/portage/cache/sqlite.py 2009-09-01 17:23:10 UTC (rev 14178)
67 @@ -47,8 +47,12 @@
68
69 def _db_escape_string(self, s):
70 """meta escaping, returns quoted string for use in sql statements"""
71 + if not isinstance(s, basestring):
72 + # Avoid potential UnicodeEncodeError in python-2.x by
73 + # only calling str() when it's absolutely necessary.
74 + s = str(s)
75 # This is equivalent to the _quote function from pysqlite 1.1.
76 - return "'%s'" % str(s).replace("'","''")
77 + return "'%s'" % s.replace("'", "''")
78
79 def _db_init_connection(self, config):
80 self._dbpath = self.location + ".sqlite"
81
82 Modified: main/branches/prefix/pym/repoman/utilities.py
83 ===================================================================
84 --- main/branches/prefix/pym/repoman/utilities.py 2009-09-01 17:20:21 UTC (rev 14177)
85 +++ main/branches/prefix/pym/repoman/utilities.py 2009-09-01 17:23:10 UTC (rev 14178)
86 @@ -346,7 +346,7 @@
87 portdir_overlay = None
88 location = os.getcwd()
89 pwd = os.environ.get('PWD', '')
90 - if pwd != location and os.path.realpath(pwd) == location:
91 + if pwd and pwd != location and os.path.realpath(pwd) == location:
92 # getcwd() returns the canonical path but that makes it hard for repoman to
93 # orient itself if the user has symlinks in their portage tree structure.
94 # We use os.environ["PWD"], if available, to get the non-canonical path of