Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 906978

Summary: FEATURES=ignore-mtime violates PMS
Product: Portage Development Reporter: Ulrich Müller <ulm>
Component: Core - Ebuild SupportAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: flow, gentoo
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=89703c688868c9eb8cd6115cb42ff92f0b9668b8
See Also: https://github.com/gentoo/portage/pull/1045
https://bugs.gentoo.org/show_bug.cgi?id=722270
https://bugs.gentoo.org/show_bug.cgi?id=264130
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 563798    

Description Ulrich Müller gentoo-dev 2023-05-23 09:02:57 UTC
The recently introduced FEATURES="ignore-mtime" violates mtime preservation as required by PMS.

Preservation of modification times exist for a good reason, because without it, some Lisp, Scheme, and Emacs Lisp packages did break in the past.

PMS reference:
https://projects.gentoo.org/pms/8/pms.html#x1-14500013.3.2
Comment 1 Ulrich Müller gentoo-dev 2023-05-23 11:38:01 UTC
To elaborate further on this, I fear that simple addition of this in FEATURES has to much potential for breakage. I am aware that the feature would be optional, but inevitably some users would enable it and report bugs triggered by it. See bug 264130 comment #0 for breakage candidates (which we _have_ seen in the past, so this is not at all theoretical).

If such a feature were to be added, I think that the way forward would be to accompany it by a corresponding RESTRICT token (e.g. RESTRICT="ignore-mtime"). That way, developers would have a means to disable it at the ebuild level. (It might also require an EAPI bump, in order to avoid breakage for existing packages.)
Comment 2 Larry the Git Cow gentoo-dev 2023-05-26 01:33:11 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=da70f89cd88968501ca07cfaca6d73665d6e767a

commit da70f89cd88968501ca07cfaca6d73665d6e767a
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-05-23 09:08:36 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-26 01:33:06 +0000

    Drop ignore-mtime from features
    
    The ignore-mtime feature violates PMS:
    https://projects.gentoo.org/pms/8/pms.html#x1-14500013.3.2
    
    Allowing the package manager to arbitrarily modify timestamps of
    installed files will lead to problems with several languages:
    
      - Lisp (*.fasl must be newer than corresponding *.lisp)
      - Emacs (*.elc must not be older than *.el)
      - ghdl/VHDL (libraries check their mtimes)
      - Python (*.pyc vs *.py, not sure if this one is still an issue)
    
    If the PM does not preserve timestamps, there is no reasonable way to
    work around this on the ebuild level. (Some horrible hacks existed in
    the past, see for example impl-*-timestamp-hack in previous versions
    of common-lisp-common*.eclass which used to overwrite its installed
    files in pkg_postinst.)
    
    This partially reverts commit 89703c688868c9eb8cd6115cb42ff92f0b9668b8.
    
    Closes: https://bugs.gentoo.org/906978
    See-also: https://bugs.gentoo.org/264130
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 lib/portage/const.py         |  1 -
 lib/portage/dbapi/vartree.py | 14 ++++++--------
 man/make.conf.5              |  6 ------
 3 files changed, 6 insertions(+), 15 deletions(-)