From 172902cd93fe1a312650df5b2c928868a722cf54 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Thu, 15 May 2008 19:25:24 +0000 Subject: [PATCH] Merged from trunk 10309:10324 | 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 --- .../package_modeling.docbook | 13 +++++++++++ man/make.conf.5 | 23 +++++++++++++------ pym/_emerge/__init__.py | 22 ++++++++++++++---- pym/portage/dbapi/vartree.py | 13 +++++++++-- pym/portage/versions.py | 6 +++-- 5 files changed, 61 insertions(+), 16 deletions(-) diff --git a/doc/dependency_resolution/package_modeling.docbook b/doc/dependency_resolution/package_modeling.docbook index e82250fab..37cdb6008 100644 --- a/doc/dependency_resolution/package_modeling.docbook +++ b/doc/dependency_resolution/package_modeling.docbook @@ -60,6 +60,19 @@ simultaneously, the overlapping files must be removed from the contents list of the package which was installed first. + + 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 + simple adjustment of merge order. 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. + Slot Conflicts diff --git a/man/make.conf.5 b/man/make.conf.5 index 4309d5067..ed33ff3a7 100644 --- a/man/make.conf.5 +++ b/man/make.conf.5 @@ -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 diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index e805fbe1b..fbaa6316f 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -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." diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 540ae81c1..b2a1e8a4b 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -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): diff --git a/pym/portage/versions.py b/pym/portage/versions.py index dcadbc1b9..42c700cc7 100644 --- a/pym/portage/versions.py +++ b/pym/portage/versions.py @@ -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 -- 2.26.2