Merged from trunk 8356:8387
authorFabian Groffen <grobian@gentoo.org>
Sat, 3 Nov 2007 13:12:49 +0000 (13:12 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sat, 3 Nov 2007 13:12:49 +0000 (13:12 -0000)
   | 8357    | In the 'there are no ebuilds to satisfy "foo"' message,      |
   | zmedico | discard null/ from failed cpv_expand category expansion.     |

   | 8358    | Optimize merge order to try and select nodes that only have  |
   | zmedico | unsatisfied PDEPEND slightly earlier. This solves a problem  |
   |         | with xorg-server being merged too early during an all binary |
   |         | install (since DEPEND is ignored for binaries), triggering   |
   |         | built_with_use() calls to fail as reported in bug #189966.   |
   |         | Since DEPEND is discarded in cases like this, it is          |
   |         | important to exploit the difference between PDEPEND and      |
   |         | RDEPEND in order to optimize merge order. Without this       |
   |         | optimization, the merge order is technically correct, but    |
   |         | not as optimal as it should be and has lots of potential to  |
   |         | trigger issues with built_with_use() or similar things that  |
   |         | require better optimization of merge order.                  |

   | 8359    | Collapse 2 identical code hunks into 1.                      |
   | zmedico |                                                              |

   | 8360    | Fix ignore_priority logic in depgraph.altlist() in order to  |
   | zmedico | handle some cases where it was possible for nodes to be      |
   |         | selected without their PDEPENDs being propperly added to the |
   |         | asap_nodes list.                                             |

   | 8366    | Make sure vardbapi.cp_list() always sorts the results.       |
   | zmedico |                                                              |

   | 8373    | Bug #197594 - Document FEATURES="lmirror".                   |
   | zmedico |                                                              |

   | 8379    | Return early from config.getMaskAtom() as soon as a matching |
   | zmedico | unmask atom is found.                                        |

   | 8381    | Make portdbapi.gvisible() use portdbapi._aux_cache_keys for  |
   | zmedico | metadata pulls.                                              |

   | 8383    | Sort scanlist and ebuildlist to ensure that repoman always   |
   | zmedico | processes packages in a predictable order.                   |

   | 8385    | In portage.fetch(), condense digest check output to a single |
   | zmedico | line for all digests.                                        |

   | 8387    | TODO: Make update_config_files() handle slotmove commands    |
   | zmedico | for SLOT atoms.                                              |

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

bin/repoman
man/make.conf.5
pym/_emerge/__init__.py
pym/portage/__init__.py
pym/portage/dbapi/porttree.py
pym/portage/dbapi/vartree.py
pym/portage/update.py

index a596f231494fc4784dd4df76d0464bfaf545b7a4..97a8d3b5c0e27d174be4c7ce0fffab8997218dc6 100755 (executable)
@@ -642,6 +642,7 @@ elif repolevel==3:
        if catdir not in repoman_settings.categories:
                caterror(catdir)
        scanlist.append(catdir+"/"+reposplit[-1])
+scanlist.sort()
 
 profiles={}
 descfile=portdir+"/profiles/profiles.desc"
@@ -873,6 +874,7 @@ for x in scanlist:
                                fails["EAPI.unsupported"].append(os.path.join(x, y))
                                continue
                        ebuild_metadata[pf] = myaux
+       ebuildlist.sort()
 
        if len(ebuild_metadata) != len(ebuildlist):
                # If we can't access all the metadata then it's totally unsafe to
index c612b89fdf7031a6f5692474855682e8fdf93121..b628a741b651f1220c80a2d74c859d6160ceddde 100644 (file)
@@ -207,6 +207,10 @@ prior to each build. Due to lack of proper cleanup, this feature can
 interfere with normal emerge operation and therefore it should not be left
 enabled for more than a short period of time.
 .TP
+.B lmirror
+When \fImirror\fR is enabled in \fBFEATURES\fR, fetch files even
+when \fImirror\fR is also in the \fBebuild\fR(5) \fBRESTRICT\fR variable.
+.TP
 .B metadata\-transfer
 Automatically perform a metadata transfer when `emerge \-\-sync` is run.
 .TP
index 6c8d0b48db59a099da39649141ceb8e6197249af..28750a2e754ff245aa33be827ea47d789e84e67b 100644 (file)
@@ -2033,6 +2033,8 @@ class depgraph(object):
                xinfo = '"%s"' % atom
                if arg:
                        xinfo='"%s"' % arg
+               # Discard null/ from failed cpv_expand category expansion.
+               xinfo = xinfo.replace("null/", "")
                if myparent:
                        xfrom = '(dependency required by '+ \
                                green('"%s"' % myparent[2]) + \
@@ -2710,7 +2712,7 @@ class depgraph(object):
                                        break
                ignore_priority_soft_range = [None]
                ignore_priority_soft_range.extend(
-                       xrange(DepPriority.MIN, DepPriority.SOFT + 1))
+                       xrange(DepPriority.MIN, DepPriority.MEDIUM_SOFT + 1))
                tree_mode = "--tree" in self.myopts
                # Tracks whether or not the current iteration should prefer asap_nodes
                # if available.  This is set to False when the previous iteration
@@ -2739,6 +2741,7 @@ class depgraph(object):
 
                while not mygraph.empty():
                        selected_nodes = None
+                       ignore_priority = None
                        if prefer_asap and asap_nodes:
                                """ASAP nodes are merged before their soft deps."""
                                asap_nodes = [node for node in asap_nodes \
@@ -2775,6 +2778,7 @@ class depgraph(object):
                                                        (accept_root_node or ignore_priority is None):
                                                        # settle for a root node
                                                        selected_nodes = [nodes[0]]
+
                        if not selected_nodes:
                                nodes = get_nodes(ignore_priority=DepPriority.MEDIUM)
                                if nodes:
@@ -2818,6 +2822,14 @@ class depgraph(object):
                                                if selected_nodes:
                                                        break
 
+                                       # If any nodes have been selected here, it's always
+                                       # possible that anything up to a MEDIUM_SOFT priority
+                                       # relationship has been ignored. This state is recorded
+                                       # in ignore_priority so that relevant nodes will be
+                                       # added to asap_nodes when appropriate.
+                                       if selected_nodes:
+                                               ignore_priority = DepPriority.MEDIUM_SOFT
+
                                        if prefer_asap and asap_nodes and not selected_nodes:
                                                # We failed to find any asap nodes to merge, so ignore
                                                # them for the next iteration.
@@ -2830,25 +2842,23 @@ class depgraph(object):
                                                accept_root_node = True
                                                continue
 
-                                       if selected_nodes and ignore_priority > DepPriority.SOFT:
-                                               # Try to merge ignored medium deps as soon as possible.
-                                               for node in selected_nodes:
-                                                       children = set(mygraph.child_nodes(node))
-                                                       soft = children.difference(
-                                                               mygraph.child_nodes(node,
-                                                               ignore_priority=DepPriority.SOFT))
-                                                       medium_soft = children.difference(
-                                                               mygraph.child_nodes(node,
-                                                               ignore_priority=DepPriority.MEDIUM_SOFT))
-                                                       medium_soft.difference_update(soft)
-                                                       for child in medium_soft:
-                                                               if child in selected_nodes:
-                                                                       continue
-                                                               if child in asap_nodes:
-                                                                       continue
-                                                               # TODO: Try harder to make these nodes get
-                                                               # merged absolutely as soon as possible.
-                                                               asap_nodes.append(child)
+                       if selected_nodes and ignore_priority > DepPriority.SOFT:
+                               # Try to merge ignored medium deps as soon as possible.
+                               for node in selected_nodes:
+                                       children = set(mygraph.child_nodes(node))
+                                       soft = children.difference(
+                                               mygraph.child_nodes(node,
+                                               ignore_priority=DepPriority.SOFT))
+                                       medium_soft = children.difference(
+                                               mygraph.child_nodes(node,
+                                               ignore_priority=DepPriority.MEDIUM_SOFT))
+                                       medium_soft.difference_update(soft)
+                                       for child in medium_soft:
+                                               if child in selected_nodes:
+                                                       continue
+                                               if child in asap_nodes:
+                                                       continue
+                                               asap_nodes.append(child)
 
                        if not selected_nodes:
                                if not myblockers.is_empty():
index 0f5443298973936a483b66af0a464ed586dea4b0..5ba87e64ecd3624ec7ed89d32e224415fe5b4b29 100644 (file)
@@ -1887,14 +1887,10 @@ class config(object):
                        for x in mask_atoms:
                                if not match_from_list(x, pkg_list):
                                        continue
-                               masked = True
                                if unmask_atoms:
                                        for y in unmask_atoms:
                                                if match_from_list(y, pkg_list):
-                                                       masked = False
-                                                       break
-                               if not masked:
-                                       continue
+                                                       return None
                                return x
                return None
 
@@ -3188,8 +3184,10 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
                                                                else:
                                                                        eout = portage.output.EOutput()
                                                                        eout.quiet = mysettings.get("PORTAGE_QUIET", None) == "1"
-                                                                       for x_key in mydigests[myfile]:
-                                                                               eout.ebegin("%s %s ;-)" % (myfile, x_key))
+                                                                       digests = mydigests.get(myfile)
+                                                                       if digests:
+                                                                               eout.ebegin("%s %s ;-)" % \
+                                                                                       (myfile, " ".join(sorted(digests))))
                                                                                eout.eend(0)
                                                                        fetched=2
                                                                        break
index 230c96cb637d122f384752089894bd6ef040ce27..e6238700db17c6745b6186cd5bc039a4ab21a8b9 100644 (file)
@@ -709,7 +709,7 @@ class portdbapi(dbapi):
                if mylist is None:
                        return []
                newlist=[]
-               aux_keys = ["IUSE", "KEYWORDS", "LICENSE", "EAPI", "SLOT"]
+               aux_keys = self._aux_cache_keys
                metadata = {}
                local_config = self.mysettings.local_config
                for mycpv in mylist:
index 05c56263590d90e831f0fe4ea61cb472dfee065b..393896982a88cd639316c6abb786a576849cc2f5 100644 (file)
@@ -368,8 +368,8 @@ class vardbapi(dbapi):
                        if len(mysplit) > 1:
                                if ps[0] == mysplit[1]:
                                        returnme.append(mysplit[0]+"/"+x)
+               self._cpv_sort_ascending(returnme)
                if use_cache:
-                       self._cpv_sort_ascending(returnme)
                        self.cpcache[mycp] = [mystat, returnme[:]]
                elif self.cpcache.has_key(mycp):
                        del self.cpcache[mycp]
index 9a5b78ba314fba02064be51e659aa691225e109e..ec99ea03e56215fcb982fee6c13f0c16cc898aee 100644 (file)
@@ -183,6 +183,7 @@ def update_config_files(config_root, protect, protect_mask, update_iter):
                        continue
        worldlist = grabfile(os.path.join(config_root, WORLD_FILE))
 
+       # TODO: handle slotmove commands for SLOT stoms
        for update_cmd in update_iter:
                if update_cmd[0] == "move":
                        old_value, new_value = update_cmd[1], update_cmd[2]