Merged from trunk -r14170:14176
authorFabian Groffen <grobian@gentoo.org>
Tue, 1 Sep 2009 17:23:10 +0000 (17:23 -0000)
committerFabian Groffen <grobian@gentoo.org>
Tue, 1 Sep 2009 17:23:10 +0000 (17:23 -0000)
   | 14171    | Bug #283223 - Don't call str() inside _db_escape_string(),  |
   | zmedico  | since it's redundant and it can trigger a                   |
   |          | UnicodeEncodeError in python-2.x.                           |

   | 14172    | Bug #283223 - Don't call str() on unicode strings inside    |
   | zmedico  | _db_escape_string(), since it can trigger a                 |
   |          | UnicodeEncodeError in python-2.x.                           |

   | 14173    | Fix broken indentation from previous commits.               |
   | zmedico  |                                                             |

   | 14174    | Bug #283292 - Fix FindPortdir() to prevent OSError: [Errno  |
   | zmedico  | 2] from stat when $PWD is unset. Thanks to Jonathan Callen  |
   |          | <en.ABCD@gmail.com> for this patch.                         |

   | 14175    | Add dev-util/gperf to list of suspected run-time            |
   | arfrever | dependencies (bug #283357).                                 |

   | 14176    | Remove reference to GRP_STAGE23_USE (bug #283358).          |
   | arfrever |                                                             |

svn path=/main/branches/prefix/; revision=14178

bin/repoman
man/portage.5
pym/portage/cache/sqlite.py
pym/repoman/utilities.py

index 91fb16d18f074bcb3b97e0508bf6cdd0776f1cde..5ca6a9f5a1803063dfcd9d2a1ae90cc6ecbf877d 100755 (executable)
@@ -406,6 +406,7 @@ suspect_rdepend = frozenset([
        "dev-util/byacc",
        "dev-util/cmake",
        "dev-util/ftjam",
+       "dev-util/gperf",
        "dev-util/gtk-doc",
        "dev-util/gtk-doc-am",
        "dev-util/intltool",
index ea592a213d8a678f03c021e91fbe7e2b0e7b20e9..9ce5b5552a9eccca29d19adc5783a7ea615f8797 100644 (file)
@@ -204,9 +204,6 @@ machines have ARCH=sparc but set this to either 'sparc32' or 'sparc64'.
 .TP
 .BR STAGE1_USE
 Special USE flags which may be needed when bootstrapping from stage1 to stage2.
-.TP
-.BR GRP_STAGE23_USE
-Special USE flags used by catalyst for building a stage3 and GRP sets.
 .RE
 .PD 1
 .TP
index 0a842488000eff64cd5ac7a1e20bc62bc6a032bb..d5f765459f6d05c4d138371f7a5d600244d96c2f 100644 (file)
@@ -47,8 +47,12 @@ class database(fs_template.FsBased):
 
        def _db_escape_string(self, s):
                """meta escaping, returns quoted string for use in sql statements"""
+               if not isinstance(s, basestring):
+                       # Avoid potential UnicodeEncodeError in python-2.x by
+                       # only calling str() when it's absolutely necessary.
+                       s = str(s)
                # This is equivalent to the _quote function from pysqlite 1.1.
-               return "'%s'" % str(s).replace("'","''")
+               return "'%s'" % s.replace("'", "''")
 
        def _db_init_connection(self, config):
                self._dbpath = self.location + ".sqlite"
index cf32399d3d88eefee7b00b2798149f8cba968110..c3665d9d8c8c9c2bc7435f71b1a0c50157497430 100644 (file)
@@ -346,7 +346,7 @@ def FindPortdir(settings):
        portdir_overlay = None
        location = os.getcwd()
        pwd = os.environ.get('PWD', '')
-       if pwd != location and os.path.realpath(pwd) == location:
+       if pwd and pwd != location and os.path.realpath(pwd) == location:
                # getcwd() returns the canonical path but that makes it hard for repoman to
                # orient itself if the user has symlinks in their portage tree structure.
                # We use os.environ["PWD"], if available, to get the non-canonical path of