summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/portageq2
-rw-r--r--pym/_emerge/actions.py2
-rw-r--r--pym/_emerge/main.py6
-rw-r--r--pym/portage/dbapi/vartree.py30
-rw-r--r--pym/portage/sets/libs.py2
-rw-r--r--pym/portage/util/_dyn_libs/LinkageMapELF.py4
6 files changed, 23 insertions, 23 deletions
diff --git a/bin/portageq b/bin/portageq
index e27ce4829..2a7807c15 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -557,7 +557,7 @@ def list_preserved_libs(argv):
if len(argv) != 1:
print("ERROR: wrong number of arguments")
sys.exit(2)
- mylibs = portage.db[argv[0]]["vartree"].dbapi.plib_registry.getPreservedLibs()
+ mylibs = portage.db[argv[0]]["vartree"].dbapi._plib_registry.getPreservedLibs()
rValue = 0
msg = []
for cpv in sorted(mylibs):
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 815032d14..9f184bb6b 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -447,7 +447,7 @@ def action_build(settings, trees, mtimedb,
portage.writemsg_stdout(colorize("WARN", "WARNING:")
+ " AUTOCLEAN is disabled. This can cause serious"
+ " problems due to overlapping packages.\n")
- trees[settings["ROOT"]]["vartree"].dbapi.plib_registry.pruneNonExisting()
+ trees[settings["ROOT"]]["vartree"].dbapi._plib_registry.pruneNonExisting()
return retval
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 81a868748..7efa35692 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -212,9 +212,9 @@ def display_preserved_libs(vardbapi, myopts):
MAX_DISPLAY = 3
# Ensure the registry is consistent with existing files.
- vardbapi.plib_registry.pruneNonExisting()
+ vardbapi._plib_registry.pruneNonExisting()
- if vardbapi.plib_registry.hasEntries():
+ if vardbapi._plib_registry.hasEntries():
if "--quiet" in myopts:
print()
print(colorize("WARN", "!!!") + " existing preserved libs found")
@@ -223,7 +223,7 @@ def display_preserved_libs(vardbapi, myopts):
print()
print(colorize("WARN", "!!!") + " existing preserved libs:")
- plibdata = vardbapi.plib_registry.getPreservedLibs()
+ plibdata = vardbapi._plib_registry.getPreservedLibs()
linkmap = vardbapi.linkmap
consumer_map = {}
owners = {}
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 48b0bc09f..be2eac259 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -140,11 +140,11 @@ class vardbapi(dbapi):
CACHE_PATH, "counter")
try:
- self.plib_registry = PreservedLibsRegistry(self._eroot,
+ self._plib_registry = PreservedLibsRegistry(self._eroot,
os.path.join(self._eroot, PRIVATE_PATH, "preserved_libs_registry"))
except PermissionDenied:
# apparently this user isn't allowed to access PRIVATE_PATH
- self.plib_registry = None
+ self._plib_registry = None
self.linkmap = LinkageMap(self)
self._owners = self._owners_db(self)
@@ -1525,7 +1525,7 @@ class dblink(object):
self._clear_contents_cache()
# Remove the registration of preserved libs for this pkg instance
- plib_registry = self.vartree.dbapi.plib_registry
+ plib_registry = self.vartree.dbapi._plib_registry
plib_registry.unregister(self.mycpv, self.settings["SLOT"],
self.vartree.dbapi.cpv_counter(self.mycpv))
@@ -1567,7 +1567,7 @@ class dblink(object):
else:
# Prune any preserved libs that may have
# been unmerged with this package.
- self.vartree.dbapi.plib_registry.pruneNonExisting()
+ self.vartree.dbapi._plib_registry.pruneNonExisting()
finally:
self.vartree.dbapi._bump_mtime(self.mycpv)
@@ -2166,7 +2166,7 @@ class dblink(object):
"""
if self._linkmap_broken or \
("preserve-libs" not in self.settings.features and \
- not self.vartree.dbapi.plib_registry.hasEntries()):
+ not self.vartree.dbapi._plib_registry.hasEntries()):
return
try:
self.vartree.dbapi.linkmap.rebuild(**kwargs)
@@ -2345,12 +2345,12 @@ class dblink(object):
"""
if self._linkmap_broken or \
- not self.vartree.dbapi.plib_registry.hasEntries():
+ not self.vartree.dbapi._plib_registry.hasEntries():
return {}
# Since preserved libraries can be consumers of other preserved
# libraries, use a graph to track consumer relationships.
- plib_dict = self.vartree.dbapi.plib_registry.getPreservedLibs()
+ plib_dict = self.vartree.dbapi._plib_registry.getPreservedLibs()
lib_graph = digraph()
preserved_nodes = set()
preserved_paths = set()
@@ -2488,7 +2488,7 @@ class dblink(object):
if x == prev:
break
- self.vartree.dbapi.plib_registry.pruneNonExisting()
+ self.vartree.dbapi._plib_registry.pruneNonExisting()
def _collision_protect(self, srcroot, destroot, mypkglist, mycontents):
@@ -2500,7 +2500,7 @@ class dblink(object):
# For collisions with preserved libraries, the current package
# will assume ownership and the libraries will be unregistered.
- plib_dict = self.vartree.dbapi.plib_registry.getPreservedLibs()
+ plib_dict = self.vartree.dbapi._plib_registry.getPreservedLibs()
plib_cpv_map = {}
plib_paths = set()
for cpv, paths in plib_dict.items():
@@ -3304,7 +3304,7 @@ class dblink(object):
# keep track of the libs we preserved
if preserve_paths:
- self.vartree.dbapi.plib_registry.register(self.mycpv,
+ self.vartree.dbapi._plib_registry.register(self.mycpv,
slot, counter, sorted(preserve_paths))
# Check for file collisions with blocking packages
@@ -3319,7 +3319,7 @@ class dblink(object):
# Unregister any preserved libs that this package has overwritten
# and update the contents of the packages that owned them.
- plib_registry = self.vartree.dbapi.plib_registry
+ plib_registry = self.vartree.dbapi._plib_registry
plib_dict = plib_registry.getPreservedLibs()
for cpv, paths in plib_collisions.items():
if cpv not in plib_dict:
@@ -3773,8 +3773,8 @@ class dblink(object):
self.lockdb()
self.vartree.dbapi._bump_mtime(self.mycpv)
try:
- self.vartree.dbapi.plib_registry.load()
- self.vartree.dbapi.plib_registry.pruneNonExisting()
+ self.vartree.dbapi._plib_registry.load()
+ self.vartree.dbapi._plib_registry.pruneNonExisting()
retval = self.treewalk(mergeroot, myroot, inforoot, myebuild,
cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
@@ -3919,8 +3919,8 @@ def unmerge(cat, pkg, myroot=None, settings=None,
try:
mylink.lockdb()
if mylink.exists():
- vartree.dbapi.plib_registry.load()
- vartree.dbapi.plib_registry.pruneNonExisting()
+ vartree.dbapi._plib_registry.load()
+ vartree.dbapi._plib_registry.pruneNonExisting()
retval = mylink.unmerge(ldpath_mtimes=ldpath_mtimes)
if retval == os.EX_OK:
mylink.delete()
diff --git a/pym/portage/sets/libs.py b/pym/portage/sets/libs.py
index 624e70bf6..3aeec5b7e 100644
--- a/pym/portage/sets/libs.py
+++ b/pym/portage/sets/libs.py
@@ -59,7 +59,7 @@ class LibraryFileConsumerSet(LibraryConsumerSet):
class PreservedLibraryConsumerSet(LibraryConsumerSet):
def load(self):
- reg = self.dbapi.plib_registry
+ reg = self.dbapi._plib_registry
consumers = set()
if reg:
plib_dict = reg.getPreservedLibs()
diff --git a/pym/portage/util/_dyn_libs/LinkageMapELF.py b/pym/portage/util/_dyn_libs/LinkageMapELF.py
index a159f7a59..8993d93f7 100644
--- a/pym/portage/util/_dyn_libs/LinkageMapELF.py
+++ b/pym/portage/util/_dyn_libs/LinkageMapELF.py
@@ -174,9 +174,9 @@ class LinkageMapELF(object):
# have to call scanelf for preserved libs here as they aren't
# registered in NEEDED.ELF.2 files
plibs = set()
- if self._dbapi.plib_registry and self._dbapi.plib_registry.getPreservedLibs():
+ if self._dbapi._plib_registry and self._dbapi._plib_registry.getPreservedLibs():
args = ["/usr/bin/scanelf", "-qF", "%a;%F;%S;%r;%n"]
- for items in self._dbapi.plib_registry.getPreservedLibs().values():
+ for items in self._dbapi._plib_registry.getPreservedLibs().values():
plibs.update(items)
args.extend(os.path.join(root, x.lstrip("." + os.sep)) \
for x in items)