Omit EPREFIX from paths in unicode QA Notice.
authorZac Medico <zmedico@gentoo.org>
Sat, 17 Mar 2012 22:11:47 +0000 (15:11 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 17 Mar 2012 22:11:47 +0000 (15:11 -0700)
pym/portage/dbapi/vartree.py
pym/portage/package/ebuild/doebuild.py

index f1e74aef9abb3cb2c65514c1d84956f044ad63fe..4811e60bd6720167dedb5edada6323c6faae4205 100644 (file)
@@ -3498,6 +3498,8 @@ class dblink(object):
                # inexpensive since we call os.walk() here anyway).
                unicode_errors = []
                line_ending_re = re.compile('[\n\r]')
+               srcroot_len = len(srcroot)
+               ed_len = len(self.settings["ED"])
 
                while True:
 
@@ -3507,7 +3509,6 @@ class dblink(object):
                        myfilelist = []
                        mylinklist = []
                        paths_with_newlines = []
-                       srcroot_len = len(srcroot)
                        def onerror(e):
                                raise
                        walk_iter = os.walk(srcroot, onerror=onerror)
@@ -3535,7 +3536,7 @@ class dblink(object):
                                                encoding=_encodings['merge'], errors='replace')
                                        os.rename(parent, new_parent)
                                        unicode_error = True
-                                       unicode_errors.append(new_parent[srcroot_len:])
+                                       unicode_errors.append(new_parent[ed_len:])
                                        break
 
                                for fname in files:
@@ -3554,7 +3555,7 @@ class dblink(object):
                                                new_fpath = os.path.join(parent, new_fname)
                                                os.rename(fpath, new_fpath)
                                                unicode_error = True
-                                               unicode_errors.append(new_fpath[srcroot_len:])
+                                               unicode_errors.append(new_fpath[ed_len:])
                                                fname = new_fname
                                                fpath = new_fpath
                                        else:
index 5d2586b0b3884ef2b2502b6204057a5c96fc4549..31ecf8cdd0cf7b7af4842ba3f775a3b88e757275 100644 (file)
@@ -1689,6 +1689,7 @@ def _post_src_install_uid_fix(mysettings, out):
        _preinst_bsdflags(mysettings)
 
        destdir = mysettings["D"]
+       ed_len = len(mysettings["ED"])
        unicode_errors = []
 
        while True:
@@ -1712,7 +1713,7 @@ def _post_src_install_uid_fix(mysettings, out):
                                        encoding=_encodings['merge'], errors='replace')
                                os.rename(parent, new_parent)
                                unicode_error = True
-                               unicode_errors.append(new_parent[len(destdir):])
+                               unicode_errors.append(new_parent[ed_len:])
                                break
 
                        for fname in chain(dirs, files):
@@ -1731,7 +1732,7 @@ def _post_src_install_uid_fix(mysettings, out):
                                        new_fpath = os.path.join(parent, new_fname)
                                        os.rename(fpath, new_fpath)
                                        unicode_error = True
-                                       unicode_errors.append(new_fpath[len(destdir):])
+                                       unicode_errors.append(new_fpath[ed_len:])
                                        fname = new_fname
                                        fpath = new_fpath
                                else: