diff options
author | 2005-01-04 02:16:39 +0000 | |
---|---|---|
committer | 2005-01-04 02:16:39 +0000 | |
commit | 4520d2120f4eca01d1e96fdce2643e27ea5153cb (patch) | |
tree | 3fd24b933af08a1366eac0bfef3fe431c38372c6 | |
parent | touchup (diff) | |
download | portage-cvs-4520d2120f4eca01d1e96fdce2643e27ea5153cb.tar.gz portage-cvs-4520d2120f4eca01d1e96fdce2643e27ea5153cb.tar.bz2 portage-cvs-4520d2120f4eca01d1e96fdce2643e27ea5153cb.zip |
Adjusted virtuals stacking so that /etc/portage/virtuals is stacked on top
of the profile virtuals (including the custom /etc/portage/profile),
reordered the list of installed virtuals to match that of the combined
profile virtuals and then stacked the installed virtuals on top of those.
Also added back the deprecation notice.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | pym/portage.py | 36 |
2 files changed, 37 insertions, 8 deletions
@@ -1,12 +1,19 @@ # ChangeLog for Portage; the Gentoo Linux ports system # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Id: ChangeLog,v 1.796.2.38 2005/01/03 15:59:56 jstubbs Exp $ +# $Id: ChangeLog,v 1.796.2.39 2005/01/04 02:16:39 jstubbs Exp $ MAJOR CHANGES in 2.0.51: 1. /var/cache/edb/virtuals is no longer used at all. It's calculated now. 2. /var/cache/edb/world is now /var/lib/portage/world. 3. /etc/portage/profile/virtuals is _USER_ configs only. + 04 Dec 2005; Jason Stubbs <jstubbs@gentoo.org> portage: Adjusted virtuals + stacking so that /etc/portage/virtuals is stacked on top of the profile + virtuals (including the custom /etc/portage/profile), reordered the list + of installed virtuals to match that of the combined profile virtuals and + then stacked the installed virtuals on top of those. Also added back the + deprecation notice. + 04 Dec 2005; Jason Stubbs <jstubbs@gentoo.org> emerge: Added code to "emerge info" to summarise variables that aren't set rather than hide them. diff --git a/pym/portage.py b/pym/portage.py index 726bd8a..b0ef78c 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1,7 +1,7 @@ # portage.py -- core Portage functionality # Copyright 1998-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/portage.py,v 1.524.2.21 2005/01/02 13:12:49 jstubbs Exp $ +# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/portage.py,v 1.524.2.22 2005/01/04 02:16:39 jstubbs Exp $ # =========================================================================== # START OF CONSTANTS -- START OF CONSTANTS -- START OF CONSTANTS -- START OF @@ -892,7 +892,6 @@ class config: self.uvlist = copy.deepcopy(clone.uvlist) self.dirVirtuals = copy.deepcopy(clone.dirVirtuals) self.treeVirtuals = copy.deepcopy(clone.treeVirtuals) - self.userVirtuals = copy.deepcopy(clone.userVirtuals) else: self.depcachedir = DEPCACHE_PATH @@ -1294,8 +1293,9 @@ class config: if not self.treeVirtuals.has_key(virt): self.treeVirtuals[virt] = [] self.treeVirtuals[virt] = portage_util.unique_array(self.treeVirtuals[virt]+[cp]) + # Reconstruct the combined virtuals. - val = stack_dictlist([self.userVirtuals]+[self.treeVirtuals]+self.dirVirtuals,incremental=1) + val = stack_dictlist([self.treeVirtuals]+self.dirVirtuals,incremental=1) for x in val.keys(): val[x].reverse() self.virtuals = val @@ -1408,16 +1408,26 @@ class config: # User settings and profile settings take precedence over tree. profile_virtuals = stack_dictlist([self.userVirtuals]+self.dirVirtuals,incremental=1) + self.userVirtuals = {} # keep this in case something else is using it. # repoman doesn't need local virtuals. if os.environ.get("PORTAGE_CALLER","") != "repoman": temp_vartree = vartree(myroot,profile_virtuals,categories=self.categories) - self.treeVirtuals = map_dictlist_vals(getCPFromCPV,temp_vartree.get_all_provides()) - for x in self.treeVirtuals.keys(): - self.treeVirtuals[x] = portage_util.unique_array(self.treeVirtuals[x]) + installed_virtuals = map_dictlist_vals(getCPFromCPV,temp_vartree.get_all_provides()) + for x in installed_virtuals.keys(): + installed_virtuals[x] = portage_util.unique_array(installed_virtuals[x]) + self.treeVirtuals[x] = [] + if profile_virtuals.has_key(x): + for y in profile_virtuals[x]: + if y in installed_virtuals[x]: + self.treeVirtuals[x].append(y) + installed_virtuals[x].remove(y) + self.treeVirtuals[x].extend(installed_virtuals[x]) + + self.dirVirtuals = [profile_virtuals] # keep this as a list for compatibility # User settings and profile settings take precedence over tree. - val = stack_dictlist([self.userVirtuals]+[self.treeVirtuals]+self.dirVirtuals,incremental=1) + val = stack_dictlist([self.treeVirtuals]+self.dirVirtuals,incremental=1) for x in val.keys(): val[x].reverse() @@ -6865,6 +6875,10 @@ if not os.path.exists(root+"var/tmp"): writemsg("portage: couldn't create /var/tmp; exiting.\n") sys.exit(1) + +##################################### +# Deprecation Checks + os.umask(022) profiledir=None if os.path.isdir(PROFILE_PATH): @@ -6883,6 +6897,14 @@ if os.path.isdir(PROFILE_PATH): writemsg(myline) writemsg("\n\n") +if os.path.exists(USER_VIRTUALS_FILE): + writemsg(red("\n!!! /etc/portage/virtuals is deprecated in favor of\n")) + writemsg(red("!!! /etc/portage/profile/virtuals. Please move it to\n")) + writemsg(red("!!! this new location.\n\n")) + +# +##################################### + db={} # ============================================================================= |