Merged from trunk 7601:7609
authorFabian Groffen <grobian@gentoo.org>
Wed, 15 Aug 2007 16:58:26 +0000 (16:58 -0000)
committerFabian Groffen <grobian@gentoo.org>
Wed, 15 Aug 2007 16:58:26 +0000 (16:58 -0000)
   | 7602    | Make sure to skip info dir files with the .old extension.    |
   | zmedico |                                                              |

   | 7604    | For bug #188782, dependencies on packages specified as       |
   | zmedico | arguments are given higher priority since the currently      |
   |         | installed version has been rendered useless by ABI breakage. |
   |         | It's okay to increase the priority here even if the caller   |
   |         | is not revdep-rebuild.                                       |

   | 7606    | For bug #188449, since python floats have limited range, we  |
   | zmedico | multiply both floating point representations by a constant   |
   |         | so that they are transformed into whole numbers. This allows |
   |         | the practically infinite range of a python int to be         |
   |         | exploited. The multiplication is done by padding both        |
   |         | literal strings with zeros as necessary to ensure equal      |
   |         | length.                                                      |

   | 7609    | For bug #188807, add nocreate and delaycompress options for  |
   | zmedico | logrotate.                                                   |

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

cnf/logrotate.d/elog-save-summary
pym/emerge/__init__.py
pym/portage/versions.py

index 282956fc261bab8efc8392fd428a3803b8260f15..bdc4972e505ed4c26328b095d8f32b8c87efe090 100644 (file)
@@ -5,4 +5,6 @@
 
 /var/log/portage/elog/summary.log {
     missingok
+    nocreate
+    delaycompress
 }
index 3c7e532c753cd69b00b4b31d77a119e67dc61725..b0c1bbfb0a146b664f4d5ce925f60dfef835aaa5 100644 (file)
@@ -697,11 +697,11 @@ class DepPriority(object):
                SOFT     The upper boundary for soft dependencies.
                MIN      The lower boundary for soft dependencies.
        """
-       __slots__ = ("__weakref__", "satisfied", "buildtime", "runtime", "runtime_post")
+       __slots__ = ("__weakref__", "satisfied", "buildtime", "runtime", "runtime_post", "rebuild")
        MEDIUM = -1
        MEDIUM_SOFT = -2
        SOFT   = -3
-       MIN    = -5
+       MIN    = -6
        def __init__(self, **kwargs):
                for myattr in self.__slots__:
                        if myattr == "__weakref__":
@@ -716,13 +716,15 @@ class DepPriority(object):
                                return -1
                        if self.runtime_post:
                                return -2
-               if self.buildtime:
+               if self.rebuild:
                        return -3
-               if self.runtime:
+               if self.buildtime:
                        return -4
-               if self.runtime_post:
+               if self.runtime:
                        return -5
-               return -5
+               if self.runtime_post:
+                       return -6
+               return -6
        def __lt__(self, other):
                return self.__int__() < other
        def __le__(self, other):
@@ -1163,24 +1165,7 @@ class depgraph(object):
                #"no downgrade" emerge
                """
                mytype, myroot, mykey = mybigkey
-               existing_node = None
-               if addme:
-                       existing_node = self.pkg_node_map[myroot].get(mykey)
-               if existing_node:
-                       self._parent_child_digraph.add(existing_node, myparent)
-                       if existing_node != myparent:
-                               # Refuse to make a node depend on itself so that the we don't
-                               # don't create a bogus circular dependency in self.altlist().
-                               if rev_dep and myparent:
-                                       self.digraph.addnode(myparent, existing_node,
-                                               priority=priority)
-                               else:
-                                       self.digraph.addnode(existing_node, myparent,
-                                               priority=priority)
-                       return 1
-               
-               if "--nodeps" not in self.myopts:
-                       self.spinner.update()
+
                if mytype == "blocks":
                        if myparent and \
                                "--buildpkgonly" not in self.myopts and \
@@ -1222,6 +1207,36 @@ class depgraph(object):
                                        return 0
                                del e
 
+               # normal arg, not system or world
+               if arg and len(self._sets) == 1 and \
+                       "selective" not in self.myparams:
+                       # For revdep-rebuild, dependencies on packages specified as
+                       # arguments are given higher priority since the currently
+                       # installed version has been rendered useless by ABI breakage.
+                       # It's okay to increase the priority here even if the caller
+                       # is not revdep-rebuild.
+                       if priority.satisfied:
+                               priority.rebuild = True
+
+               existing_node = None
+               if addme:
+                       existing_node = self.pkg_node_map[myroot].get(mykey)
+               if existing_node:
+                       self._parent_child_digraph.add(existing_node, myparent)
+                       if existing_node != myparent:
+                               # Refuse to make a node depend on itself so that the we don't
+                               # don't create a bogus circular dependency in self.altlist().
+                               if rev_dep and myparent:
+                                       self.digraph.addnode(myparent, existing_node,
+                                               priority=priority)
+                               else:
+                                       self.digraph.addnode(existing_node, myparent,
+                                               priority=priority)
+                       return 1
+               
+               if "--nodeps" not in self.myopts:
+                       self.spinner.update()
+
                reinstall_for_flags = None
                merging=1
                if mytype == "installed":
@@ -4253,7 +4268,8 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval):
                                        if x.startswith("dir"):
                                                skip = False
                                                for ext in dir_extensions:
-                                                       if x == "dir" + ext:
+                                                       if x == "dir" + ext or \
+                                                               x == "dir" + ext + ".old":
                                                                skip = True
                                                                break
                                                if skip:
index 9b0608430aae708e43173333eda9b2f0b0ac42fd..49804311f1e3db626d2885c2b3197ec337963b44 100644 (file)
@@ -99,8 +99,17 @@ def vercmp(ver1, ver2, silent=1):
                                list2.append(int(vlist2[i]))
                        # now we have to use floats so 1.02 compares correctly against 1.1
                        else:
-                               list1.append(float("0."+vlist1[i]))
-                               list2.append(float("0."+vlist2[i]))
+                               # list1.append(float("0."+vlist1[i]))
+                               # list2.append(float("0."+vlist2[i]))
+                               # Since python floats have limited range, we multiply both
+                               # floating point representations by a constant so that they are
+                               # transformed into whole numbers. This allows the practically
+                               # infinite range of a python int to be exploited. The
+                               # multiplication is done by padding both literal strings with
+                               # zeros as necessary to ensure equal length.
+                               max_len = max(len(vlist1[i]), len(vlist2[i]))
+                               list1.append(int(vlist1[i].ljust(max_len, "0")))
+                               list2.append(int(vlist2[i].ljust(max_len, "0")))
 
        # and now the final letter
        if len(match1.group(5)):