Merged from trunk 10309:10324
authorFabian Groffen <grobian@gentoo.org>
Thu, 15 May 2008 19:25:24 +0000 (19:25 -0000)
committerFabian Groffen <grobian@gentoo.org>
Thu, 15 May 2008 19:25:24 +0000 (19:25 -0000)
   | 10310    | In the warning about eclasses in overlay overriding         |
   | zmedico  | eclasses from PORTDIR, also advise the user to add          |
   |          | FEATURES="metadata-transfer" to make.conf.                  |

   | 10312    | Filter sets that are not "world candidates" from the        |
   | zmedico  | favorites list at the last moment since the favorites list  |
   |          | needs to be complete for depgraph.loadResumeCommand() to    |
   |          | operate correctly.                                          |

   | 10313    | Define the world_candidates variable earlier to make sure   |
   | zmedico  | it's in scope.                                              |

   | 10314    | Bug #220533 - Document FEATURES="skiprocheck".              |
   | zmedico  |                                                             |

   | 10316    | Describe how we limit the probability that temporary        |
   | zmedico  | simultaneous installation of blocking packages will cause   |
   |          | some sort of problem.                                       |

   | 10318    | capitalize Portage                                          |
   | zmedico  |                                                             |

   | 10320    | fix man markup for PORTAGE_FETCH_RESUME_MIN_SIZE            |
   | SpankMan |                                                             |

   | 10322    | Check vercmp() return value to avoid arbitrary results in   |
   | genone   | case it returns None                                        |

   | 10324    | ignore consumers from the current package instance when     |
   | genone   | checking if a preserved library can be removed              |

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

doc/dependency_resolution/package_modeling.docbook
man/make.conf.5
pym/_emerge/__init__.py
pym/portage/dbapi/vartree.py
pym/portage/versions.py

index e82250fabd1f15ed15aaca2cff15cc7f725471ea..37cdb60083776e9b23386dc0b698c2a53dc376aa 100644 (file)
                simultaneously, the overlapping files must be removed from
                the contents list of the package which was installed first.
                </para>
+               <para>
+               Some cases may exist such that temporary simultaneous installation
+               of blocking packages will cause some sort of problem. However,
+               this type of solution will only be chosen for blockers that can not
+               be satisfied in any other way, such as by <link
+               linkend='dependency-resolution-task-scheduling-conflict-avoidance'>
+               simple adjustment of merge order.</link> In addition, this type of
+               solution will not be chosen if a blocking package will overwrite
+               files belonging to packages from the system set, or packages that are
+               runtime dependencies of Portage itself. These constraints serve to
+               limit the probability that a chosen solution will cause an unforeseen
+               problem.
+               </para>
        </sect2>
        <sect2 id='dependency-resolution-package-modeling-slot-conflicts'>
                <title>Slot Conflicts</title>
index 4309d5067e6166aea5b60c2e312b041f8e4408a8..ed33ff3a768c863c7ca0d10b3b51eeb5759cd6b0 100644 (file)
@@ -281,6 +281,15 @@ See also \fIsuidctl\fR below.
 When commiting work to cvs with \fBrepoman\fR(1), sign the Manifest with 
 a GPG key.  Read about the \fIPORTAGE_GPG_KEY\fR variable in \fBmake.conf\fR(5).
 .TP
+.B skiprocheck
+Skip write access checks on \fBDISTDIR\fR when fetching files. This is
+useful when \fBFETCHCOMMAND\fR and \fBRESUMECOMMAND\fR are used to
+forward fetch requests to a server that exposes \fBDISTDIR\fR as
+a read-only NFS share. A read-only \fBDISTDIR\fR is not compatible with the
+\fIdistlocks\fR, so it is recommended to also add "-distlocks" to
+\fBFEATURES\fR in order to avoid warning messages that are triggered by this
+incompatibility.
+.TP
 .B splitdebug
 Prior to stripping ELF etdyn and etexec files, the debugging info is 
 stored for later use by various debuggers.  This feature is disabled by
@@ -428,13 +437,13 @@ Please see /etc/make.conf.example for elog documentation.
 \fBPORTAGE_FETCH_CHECKSUM_TRY_MIRRORS\fR = \fI5\fR
 Number of mirrors to try when a downloaded file has an incorrect checksum.
 .TP
-\PORTAGE_FETCH_RESUME_MIN_SIZE\fR = \fI350K\fR
-Minimum size of existing file for RESUMECOMMAND to be called. Files smaller
-than this size will be removed and FETCHCOMMAND will be called to download
-the file from the beginning. This is useful for helping to ensure that small
-garbage files such as html 404 pages are properly discarded. The variable
-should contain an integer number of bytes and may have a suffix such as
-K, M, or G.
+\fBPORTAGE_FETCH_RESUME_MIN_SIZE\fR = \fI350K\fR
+Minimum size of existing file for \fBRESUMECOMMAND\fR to be called. Files
+smaller than this size will be removed and \fBFETCHCOMMAND\fR will be called
+to download the file from the beginning. This is useful for helping to ensure
+that small garbage files such as html 404 pages are properly discarded. The
+variable should contain an integer number of bytes and may have a suffix such
+as K, M, or G.
 .TP
 \fBPORTAGE_NICENESS\fR = \fI[number]\fR
 The value of this variable will be added to the current nice level that
index e805fbe1b91b8d10593b205c9162b82e81fc6b38..fbaa6316fb56977edf31b1ddcd8d09408a485ec0 100644 (file)
@@ -2589,8 +2589,7 @@ class depgraph(object):
                                        self._sets[s] = expanded_set
                                        args.append(SetArg(arg=x, set=expanded_set,
                                                root_config=root_config))
-                                       if sets[s].world_candidate:
-                                               myfavorites.append(x)
+                                       myfavorites.append(x)
                                        continue
                                if not is_valid_package_atom(x):
                                        portage.writemsg("\n\n!!! '%s' is not a valid package atom.\n" % x,
@@ -8370,9 +8369,21 @@ def action_build(settings, trees, mtimedb,
                                        mergecount += 1
 
                        if mergecount==0:
-                               if "--noreplace" in myopts and not oneshot and favorites:
+                               sets = trees[settings["ROOT"]]["root_config"].sets
+                               world_candidates = None
+                               if "--noreplace" in myopts and \
+                                       not oneshot and favorites:
+                                       # Sets that are not world candidates are filtered
+                                       # out here since the favorites list needs to be
+                                       # complete for depgraph.loadResumeCommand() to
+                                       # operate correctly.
+                                       world_candidates = [x for x in favorites \
+                                               if not (x.startswith(SETPREFIX) and \
+                                               not sets[x[1:]].world_candidate)]
+                               if "--noreplace" in myopts and \
+                                       not oneshot and world_candidates:
                                        print
-                                       for x in favorites:
+                                       for x in world_candidates:
                                                print " %s %s" % (good("*"), x)
                                        prompt="Would you like to add these packages to your world favorites?"
                                elif settings["AUTOCLEAN"] and "yes"==settings["AUTOCLEAN"]:
@@ -8797,7 +8808,8 @@ def emerge_main():
                msg = "It is best to avoid overridding eclasses from PORTDIR " + \
                "because it will trigger invalidation of cached ebuild metadata " + \
                "that is distributed with the portage tree. If you must " + \
-               "override eclasses from PORTDIR then you are advised to run " + \
+               "override eclasses from PORTDIR then you are advised to add " + \
+               "FEATURES=\"metadata-transfer\" to /etc/make.conf and to run " + \
                "`emerge --regen` after each time that you run `emerge --sync`. " + \
                "Set PORTAGE_ECLASS_WARNING_ENABLE=\"0\" in /etc/make.conf if " + \
                "you would like to disable this warning."
index 540ae81c186990114ceea9a5bf9ced39e04b1bcf..b2a1e8a4b764782d2e34d830374ded85bf72c41d 100644 (file)
@@ -1351,7 +1351,7 @@ class dblink(object):
 
                        # regenerate reverse NEEDED map
                        self.vartree.dbapi.linkmap.rebuild()
-                       
+
                        # remove preserved libraries that don't have any consumers left
                        # FIXME: this code is quite ugly and can likely be optimized in several ways
                        plib_dict = plib_registry.getPreservedLibs()
@@ -1378,8 +1378,17 @@ class dblink(object):
                                        if not os.path.exists(f):
                                                continue
                                        unlink_list = []
-                                       if not self.vartree.dbapi.linkmap.findConsumers(f):
+                                       consumers = self.vartree.dbapi.linkmap.findConsumers(f)
+                                       if not consumers:
                                                unlink_list.append(f)
+                                       else:
+                                               keep=False
+                                               for c in consumers:
+                                                       if c not in self.getcontents():
+                                                               keep=True
+                                                               break
+                                               if not keep:
+                                                       unlink_list.append(f)
                                        for obj in unlink_list:
                                                try:
                                                        if os.path.islink(obj):
index dcadbc1b96eb42d625e40b0260311f589f809ec1..42c700cc73ed41d3413765d56fd0d8b7b885dadb 100644 (file)
@@ -213,9 +213,11 @@ def pkgcmp(pkg1, pkg2):
        if pkg1[0] != pkg2[0]:
                return None
        mycmp = vercmp("-".join(pkg1[1:]), "-".join(pkg2[1:]))
-       if mycmp>0:
+       if mycmp is None:
+               return mycmp
+       if mycmp > 0:
                return 1
-       if mycmp<0:
+       if mycmp < 0:
                return -1
        return 0