summaryrefslogtreecommitdiffstats
path: root/pym/portage
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-09-21 14:19:18 -0700
committerZac Medico <zmedico@gentoo.org>2012-09-21 14:33:18 -0700
commit6f065d4911cd72a33e01fa8100d53ed16c6e7e4e (patch)
tree97150bd675707a6e99a0ab45d4471266e70ffb08 /pym/portage
parent6ee701eb65fbfc00cbf6ebc16de2d6487ba2cfd7 (diff)
downloadportage-6f065d4911cd72a33e01fa8100d53ed16c6e7e4e.tar.gz
portage-6f065d4911cd72a33e01fa8100d53ed16c6e7e4e.tar.bz2
portage-6f065d4911cd72a33e01fa8100d53ed16c6e7e4e.zip
Add preserve-libs for stable branch (not default)
EAPI 5 supports automatic rebuilds via the slot-operator and sub-slots, which makes preserve-libs much more user-friendly, since it makes @preserved-rebuild unnecessary (also see bug #364425 for explanation of @preserved-rebuild shortcomings). Therefore, enable preserve-libs for the stable branch, but not by default. After EAPI 5 is widely adopted, we can consider enabling preserve-libs by default.
Diffstat (limited to 'pym/portage')
-rw-r--r--pym/portage/_sets/__init__.py4
-rw-r--r--pym/portage/const.py13
-rw-r--r--pym/portage/dbapi/vartree.py13
3 files changed, 8 insertions, 22 deletions
diff --git a/pym/portage/_sets/__init__.py b/pym/portage/_sets/__init__.py
index f92c2cba6..de3e8e45e 100644
--- a/pym/portage/_sets/__init__.py
+++ b/pym/portage/_sets/__init__.py
@@ -142,6 +142,10 @@ class SetConfig(object):
parser.set("module-rebuild", "class", "portage.sets.dbapi.OwnerSet")
parser.set("module-rebuild", "files", "/lib/modules")
+ parser.remove_section("preserved-rebuild")
+ parser.add_section("preserved-rebuild")
+ parser.set("preserved-rebuild", "class", "portage.sets.libs.PreservedLibraryConsumerSet")
+
parser.remove_section("x11-module-rebuild")
parser.add_section("x11-module-rebuild")
parser.set("x11-module-rebuild", "class", "portage.sets.dbapi.OwnerSet")
diff --git a/pym/portage/const.py b/pym/portage/const.py
index 1e3da36f2..3242861cf 100644
--- a/pym/portage/const.py
+++ b/pym/portage/const.py
@@ -99,7 +99,7 @@ SUPPORTED_FEATURES = frozenset([
"metadata-transfer", "mirror", "multilib-strict", "news",
"noauto", "noclean", "nodoc", "noinfo", "noman",
"nostrip", "notitles", "parallel-fetch", "parallel-install",
- "prelink-checksums",
+ "prelink-checksums", "preserve-libs",
"protect-owned", "python-trace", "sandbox",
"selinux", "sesandbox", "sfperms",
"sign", "skiprocheck", "split-elog", "split-log", "splitdebug",
@@ -166,18 +166,7 @@ if "PORTAGE_OVERRIDE_EPREFIX" in os.environ:
# Private constants for use in conditional code in order to minimize the diff
# between branches.
-_ENABLE_DYN_LINK_MAP = True
_DEPCLEAN_LIB_CHECK_DEFAULT = True
-_ENABLE_PRESERVE_LIBS = True
_ENABLE_REPO_NAME_WARN = True
_ENABLE_SET_CONFIG = True
_ENABLE_INHERIT_CHECK = True
-
-
-# The definitions above will differ between branches, so it's useful to have
-# common lines of diff context here in order to avoid merge conflicts.
-
-if _ENABLE_PRESERVE_LIBS:
- SUPPORTED_FEATURES = set(SUPPORTED_FEATURES)
- SUPPORTED_FEATURES.add("preserve-libs")
- SUPPORTED_FEATURES = frozenset(SUPPORTED_FEATURES)
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 1dadd3cbb..7d6d6a8f1 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -40,7 +40,6 @@ portage.proxy.lazyimport.lazyimport(globals(),
from portage.const import CACHE_PATH, CONFIG_MEMORY_FILE, \
PORTAGE_PACKAGE_ATOM, PRIVATE_PATH, VDB_PATH
-from portage.const import _ENABLE_DYN_LINK_MAP, _ENABLE_PRESERVE_LIBS
from portage.dbapi import dbapi
from portage.exception import CommandNotFound, \
InvalidData, InvalidLocation, InvalidPackageName, \
@@ -172,15 +171,9 @@ class vardbapi(dbapi):
self._counter_path = os.path.join(self._eroot,
CACHE_PATH, "counter")
- self._plib_registry = None
- if _ENABLE_PRESERVE_LIBS:
- self._plib_registry = PreservedLibsRegistry(settings["ROOT"],
- os.path.join(self._eroot, PRIVATE_PATH,
- "preserved_libs_registry"))
-
- self._linkmap = None
- if _ENABLE_DYN_LINK_MAP:
- self._linkmap = LinkageMap(self)
+ self._plib_registry = PreservedLibsRegistry(settings["ROOT"],
+ os.path.join(self._eroot, PRIVATE_PATH, "preserved_libs_registry"))
+ self._linkmap = LinkageMap(self)
self._owners = self._owners_db(self)
self._cached_counter = None