Merged from trunk 7521:7528
authorFabian Groffen <grobian@gentoo.org>
Tue, 31 Jul 2007 15:53:38 +0000 (15:53 -0000)
committerFabian Groffen <grobian@gentoo.org>
Tue, 31 Jul 2007 15:53:38 +0000 (15:53 -0000)
   +------------------------------------------------------------------------+
   | 7522    | Make finalize() accept a parameter once again since older    |
   | zmedico | versions of portage import elog modules from newer versions  |
   |         | of portage when they upgrade themselves.                     |
   |---------+--------------------------------------------------------------|
   | 7524    | For bug #187142, properly pass a dbapi instance into         |
   | zmedico | setcpv() so that USE_EXPAND wildcards work correctly.        |
   |---------+--------------------------------------------------------------|
   | 7526    | As a workaround for bug #185305, make quickpkg break         |
   | zmedico | hardlinks during creation of the archive.                    |
   |---------+--------------------------------------------------------------|
   | 7528    | Change the numeric value of DepPriority.MIN to be equal to   |
   | zmedico | that of a satisfied PDEPEND since there is currently nothing |
   |         | with lower priority.                                         |
   +------------------------------------------------------------------------+

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

pym/emerge/__init__.py
pym/portage/dbapi/vartree.py
pym/portage/elog/mod_echo.py
pym/portage/elog/mod_mail_summary.py

index dcf17c94bdb11e75995ab9e89ef29d439795eaa6..102752287953c169f31b07b16f2f7cf1285e146f 100644 (file)
@@ -701,7 +701,7 @@ class DepPriority(object):
        MEDIUM = -1
        MEDIUM_SOFT = -2
        SOFT   = -3
-       MIN    = -6
+       MIN    = -5
        def __init__(self, **kwargs):
                for myattr in self.__slots__:
                        if myattr == "__weakref__":
@@ -722,7 +722,7 @@ class DepPriority(object):
                        return -4
                if self.runtime_post:
                        return -5
-               return -6
+               return -5
        def __lt__(self, other):
                return self.__int__() < other
        def __le__(self, other):
@@ -2744,7 +2744,7 @@ class depgraph(object):
                                                raise portage.exception.PackageNotFound(pkg_key)
                                        repo_path_real = os.path.dirname(os.path.dirname(
                                                os.path.dirname(ebuild_path)))
-                                       pkgsettings.setcpv(pkg_key)
+                                       pkgsettings.setcpv(pkg_key, mydb=mydbapi)
                                        metadata["USE"] = pkgsettings["USE"]
                                else:
                                        repo_path_real = portdb.getRepositoryPath(repo_name)
index aeb820610d0285b5894b1ce877006c381c4f4b70..9d650953d0916e883230f7f5c74aa666a8158629 100644 (file)
@@ -2192,6 +2192,7 @@ class dblink(object):
 
 def tar_contents(contents, root, tar, protect=None, onProgress=None):
        from portage.util import normalize_path
+       import tarfile
        root = normalize_path(root).rstrip(os.path.sep) + os.path.sep
        id_strings = {}
        maxval = len(contents)
@@ -2231,6 +2232,8 @@ def tar_contents(contents, root, tar, protect=None, onProgress=None):
                tarinfo.gname = id_strings.setdefault(tarinfo.gid, str(tarinfo.gid))
 
                if stat.S_ISREG(lst.st_mode):
+                       # break hardlinks due to bug #185305
+                       tarinfo.type = tarfile.REGTYPE
                        if protect and protect(path):
                                # Create an empty file as a place holder in order to avoid
                                # potential collision-protect issues.
index 9ae6fcf6c4e4c390948e83c89833bb888b2d2cf5..e9bd4bd381bd438fdf7a64bde0fd3bcdb82f06f9 100644 (file)
@@ -11,7 +11,10 @@ def process(mysettings, key, logentries, fulltext):
        global _items
        _items.append((mysettings, key, logentries))
 
-def finalize():
+def finalize(mysettings=None):
+       """The mysettings parameter is just for backward compatibility since
+       an older version of portage will import the module from a newer version
+       when it upgrades itself."""
        global _items
        printer = EOutput()
        for mysettings, key, logentries in _items:
index 884df40c839e83927067a61aba10ccb0df9474cd..7410f05af326e63e4e2fb458336e2c6240b300cd 100644 (file)
@@ -15,7 +15,10 @@ def process(mysettings, key, logentries, fulltext):
        mysettings, items = _items.setdefault(config_root, (mysettings, {}))
        items[key] = header + fulltext
 
-def finalize():
+def finalize(mysettings=None):
+       """The mysettings parameter is just for backward compatibility since
+       an older version of portage will import the module from a newer version
+       when it upgrades itself."""
        global _items
        for mysettings, items in _items.itervalues():
                _finalize(mysettings, items)