diff options
-rw-r--r-- | man/make.conf.5 | 7 | ||||
-rw-r--r-- | pym/portage/const.py | 5 | ||||
-rw-r--r-- | pym/portage/dbapi/vartree.py | 12 |
3 files changed, 17 insertions, 7 deletions
diff --git a/man/make.conf.5 b/man/make.conf.5 index 74b24576b..8a36193be 100644 --- a/man/make.conf.5 +++ b/man/make.conf.5 @@ -358,6 +358,13 @@ Parse \fBEAPI\fR from the head of the ebuild (first 30 lines). This feature 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. diff --git a/pym/portage/const.py b/pym/portage/const.py index bd2c5be8d..db543d76c 100644 --- a/pym/portage/const.py +++ b/pym/portage/const.py @@ -92,8 +92,9 @@ SUPPORTED_FEATURES = frozenset([ "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", diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index f986c0a3c..b2e03e9c3 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1,4 +1,4 @@ -# Copyright 1998-2009 Gentoo Foundation +# Copyright 1998-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 __all__ = ["PreservedLibsRegistry", "LinkageMap", @@ -2446,6 +2446,7 @@ class dblink(object): stale_confmem = [] unmerge_orphans = "unmerge-orphans" in self.settings.features + calc_prelink = "prelink-checksums" in self.settings.features if pkgfiles: self.updateprotect() @@ -2630,7 +2631,7 @@ class dblink(object): 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) @@ -4153,7 +4154,8 @@ class dblink(object): 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. @@ -4314,7 +4316,7 @@ class dblink(object): 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 @@ -4345,7 +4347,7 @@ class dblink(object): 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 |