aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/portage/const.py1
-rw-r--r--lib/portage/dbapi/vartree.py8
-rw-r--r--man/make.conf.56
3 files changed, 15 insertions, 0 deletions
diff --git a/lib/portage/const.py b/lib/portage/const.py
index 10a208ceb..cb6796164 100644
--- a/lib/portage/const.py
+++ b/lib/portage/const.py
@@ -159,6 +159,7 @@ SUPPORTED_FEATURES = frozenset(
"getbinpkg",
"gpg-keepalive",
"icecream",
+ "ignore-mtime",
"installsources",
"ipc-sandbox",
"keeptemp",
diff --git a/lib/portage/dbapi/vartree.py b/lib/portage/dbapi/vartree.py
index 739b47f7f..441e74661 100644
--- a/lib/portage/dbapi/vartree.py
+++ b/lib/portage/dbapi/vartree.py
@@ -5422,6 +5422,7 @@ class dblink:
srcroot = normalize_path(srcroot).rstrip(sep) + sep
destroot = normalize_path(destroot).rstrip(sep) + sep
calc_prelink = "prelink-checksums" in self.settings.features
+ ignore_mtime = "ignore-mtime" in self.settings.features
protect_if_modified = (
"config-protect-if-modified" in self.settings.features
@@ -5830,6 +5831,13 @@ class dblink:
hardlink_candidates.append(mydest)
zing = ">>>"
else:
+ if not ignore_mtime:
+ mymtime = thismtime if thismtime is not None else mymtime
+ try:
+ os.utime(mydest, ns=(mymtime, mymtime))
+ except OSError:
+ # utime can fail here with EPERM
+ pass
zing = "==="
try:
diff --git a/man/make.conf.5 b/man/make.conf.5
index 85ee88c05..ed5b7d7fc 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -533,6 +533,12 @@ If your GPG is auto unlocked on login, you do not need this.
.B icecream
Enable portage support for the icecream package.
.TP
+.B ignore\-mtime
+Do not update mtime if the target file is equal. This can be useful on some
+filesystems to better utilize features like snapshots and data deduplication,
+however this violates the preservation of file modification times as stipulated
+in the PMS.
+.TP
.B installsources
Install source code into /usr/src/debug/${CATEGORY}/${PF} (also see
\fBsplitdebug\fR). This feature works only if debugedit is installed, CFLAGS