diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/portage/const.py | 1 | ||||
-rw-r--r-- | lib/portage/dbapi/vartree.py | 8 |
2 files changed, 9 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: |