merge and unmerge.
* Add FEATURES=prelink-checksums in order to trigger the old behavior.
is only intended for experimental purposes and should not be enabled under
normal circumstances.
.TP
+.B prelink\-checksums
+If \fBprelink\fR(8) is installed then use it to undo any prelinks on files
+before computing checksums for merge and unmerge. This feature is
+useful only if \fBprelink\fR(8) is installed and accurate checksums (despite
+prelinking) are needed for some reason such as for checking the integrity of
+installed files or because the \fIunmerge\-orphans\fR feature is disabled.
+.TP
.B preserve\-libs
Preserve libraries when the sonames change during upgrade or downgrade.
Libraries are preserved only if consumers of those libraries are detected.
"metadata-transfer", "mirror", "multilib-strict", "news",
"noauto", "noclean", "nodoc", "noinfo", "noman", "nostrip",
"notitles", "parallel-fetch", "parse-eapi-ebuild-head",
- "parse-eapi-glep-55", "preserve-libs", "protect-owned",
- "python-trace", "sandbox", "sesandbox", "severe", "sfperms",
+ "parse-eapi-glep-55", "prelink-checksums", "preserve-libs",
+ "protect-owned", "python-trace", "sandbox",
+ "sesandbox", "severe", "sfperms",
"sign", "skiprocheck", "split-elog", "split-log", "splitdebug",
"strict", "stricter", "suidctl", "test", "test-fail-continue",
"unknown-features-warn",
-# Copyright 1998-2009 Gentoo Foundation
+# Copyright 1998-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
__all__ = ["PreservedLibsRegistry", "LinkageMap",
stale_confmem = []
unmerge_orphans = "unmerge-orphans" in self.settings.features
+ calc_prelink = "prelink-checksums" in self.settings.features
if pkgfiles:
self.updateprotect()
continue
mymd5 = None
try:
- mymd5 = perf_md5(obj, calc_prelink=1)
+ mymd5 = perf_md5(obj, calc_prelink=calc_prelink)
except FileNotFound as e:
# the file has disappeared between now and our stat call
show_unmerge("---", unmerge_desc["!obj"], file_type, obj)
join = os.path.join
srcroot = normalize_path(srcroot).rstrip(sep) + sep
destroot = normalize_path(destroot).rstrip(sep) + sep
-
+ calc_prelink = "prelink-checksums" in self.settings.features
+
# this is supposed to merge a list of files. There will be 2 forms of argument passing.
if isinstance(stufftomerge, basestring):
#A directory is specified. Figure out protection paths, listdir() it and process it.
return 1
elif stat.S_ISREG(mymode):
# we are merging a regular file
- mymd5 = perform_md5(mysrc, calc_prelink=1)
+ mymd5 = perform_md5(mysrc, calc_prelink=calc_prelink)
# calculate config file protection stuff
mydestdir = os.path.dirname(mydest)
moveme = 1
if protected:
# we have a protection path; enable config file management.
cfgprot = 0
- destmd5 = perform_md5(mydest, calc_prelink=1)
+ destmd5 = perform_md5(mydest, calc_prelink=calc_prelink)
if mymd5 == destmd5:
#file already in place; simply update mtimes of destination
moveme = 1