From de9966a7148b17a1918513732cfd917971fc4862 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sat, 25 Apr 2009 08:35:39 +0000 Subject: [PATCH] Merged from trunk -r13369:13375 | 13370 | Add notes about eclass precedence for metadata/layout.conf. | | zmedico | | | 13371 | Emphasize precedence of repos.conf over layout.conf. | | zmedico | | | 13372 | Tweak _eclasses_ logic inside action_metadata(). | | zmedico | | | 13373 | Add missing del when cleansing cache in action_metadata(). | | zmedico | | | 13374 | Drop from --ask to --pretend for uninstall all actions. | | zmedico | | | 13375 | Add note about 'use' in the Atom.intersects() docstring. | | zmedico | | svn path=/main/branches/prefix/; revision=13392 --- man/portage.5 | 12 ++++++++++-- pym/_emerge/__init__.py | 17 ++++++++++------- pym/portage/dep.py | 5 +++-- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/man/portage.5 b/man/portage.5 index 0ac8be92f..8121e367c 100644 --- a/man/portage.5 +++ b/man/portage.5 @@ -587,12 +587,20 @@ Specifies information about the repository layout. Currently, only a single repositories which satisfy dependencies on eclasses and/or ebuilds. Each repository name should correspond the value of a \fBrepo_name\fR entry from one of the repositories that is configured via the \fBPORTDIR\fR or -\fBPORTDIR_OVERLAY\fR variables (see \fBmake.conf\fR(5)). Site-specific +\fBPORTDIR_OVERLAY\fR variables (see \fBmake.conf\fR(5)). Repositories listed +toward the right of the \fBmasters\fR list take precedence over those listed +toward the left of the list. \fISite-specific\fR overrides to \fBlayout.conf\fR settings may be specified in -\fB/etc/portage/repos.conf\fR. +\fB/etc/portage/repos.conf\fR. Settings in \fBrepos.conf\fR take +precedence over settings in \fBlayout.conf\fR, except tools such as +\fBrepoman\fR(1) and \fBegencache\fR(1) will entirely ignore +\fBrepos.conf\fR since their operations are inherently \fBnot\fR +\fIsite\-specific\fR. .I Example: .nf +# eclasses provided by java-overlay take precedence over identically named +# eclasses that are provided by gentoo masters = gentoo java-overlay .fi .RE diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index a356b11ae..73245722f 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -13641,12 +13641,12 @@ def action_metadata(settings, portdb, myopts, porttrees=None): else: inherited = inherited.split() - if inherited: - if tree_data.src_db.complete_eclass_entries and \ - eclasses is None: - noise.corruption(cpv, "missing _eclasses_ field") - continue + if tree_data.src_db.complete_eclass_entries and \ + eclasses is None: + noise.corruption(cpv, "missing _eclasses_ field") + continue + if inherited: # Even if _eclasses_ already exists, replace it with data from # eclass_cache, in order to insert local eclass paths. try: @@ -13660,6 +13660,8 @@ def action_metadata(settings, portdb, myopts, porttrees=None): noise.eclass_stale(cpv) continue src['_eclasses_'] = eclasses + else: + src['_eclasses_'] = {} if not eapi_supported: src = { @@ -13693,7 +13695,7 @@ def action_metadata(settings, portdb, myopts, porttrees=None): dead_nodes.difference_update(tree_data.valid_nodes) for cpv in dead_nodes: try: - tree_data.dest_db[cpv] + del tree_data.dest_db[cpv] except (KeyError, CacheError): pass @@ -16208,7 +16210,8 @@ def emerge_main(): if portage.secpass < 2: # We've already allowed "--version" and "--help" above. if "--pretend" not in myopts and myaction not in ("search","info"): - need_superuser = myaction in ('deselect',) or not \ + need_superuser = myaction in ('clean', 'depclean', 'deselect', + 'prune', 'unmerge') or not \ (fetchonly or \ (buildpkgonly and secpass >= 1) or \ myaction in ("metadata", "regen") or \ diff --git a/pym/portage/dep.py b/pym/portage/dep.py index 80ebdadbc..679a8558d 100644 --- a/pym/portage/dep.py +++ b/pym/portage/dep.py @@ -560,8 +560,9 @@ class Atom(object): def intersects(self, other): """ - Atoms with different operator or cpv attributes cause this method to - return False. TODO: Detect intersection when operators are present. + Atoms with different cpv, operator or use attributes cause this method + to return False even though there may actually be some intersection. + TODO: Detect more forms of intersection. @param other: The package atom to match @type other: Atom @rtype: Boolean -- 2.26.2