install_qa_check calls prepinfo, which loops over the directories in INFOPATH and removes any dir{,.info} files (possibly with compress suffix) found there: find "${ED%/}/${infodir#/}" -type d -print0 | while read -r -d $'\0' x ; do for f in "${x}"/.keepinfodir*; do [[ -e ${f} ]] && continue 2 done rm -f "${x}"/dir{,.info}{,.Z,.gz,.bz2,.lzma,.lz,.xz,.zst} done Looks like this was introduced following bug 170133 comment #1, where I said: > IMHO removal of the compressed dir file isn't the business of the Emacs > ebuild, but should be handled by portage. 15 years later, the original reasons no longer apply. The compression issue has been solved with the introduction of docompress in EAPI 3, and there is no longer a reason for the package manager to remove Info dir files from subdirectories. Plus, none of this is specified in PMS. So, I suggest the following. The goal would be: a) Portage should not modify the installed image, and b) ebuilds should be responsible to avoid any collisions, e.g. they should not install a /usr/share/info/dir file. To transition to this: 1) Add a QA warning before the rm command. 2) Wait some time, so ebuild authors can fix this (i.e. remove potentially colliding dir files). 3) Drop the whole "for" loop. Add a QA notice if a dir file is found in the top-level Info dir (i.e. "${ED%/}"/usr/share/info or "${ED%/}/${infodir#/}").
(In reply to Ulrich Müller from comment #0) > To transition to this: > 1) Add a QA warning before the rm command. > 2) Wait some time, so ebuild authors can fix this (i.e. remove potentially > colliding dir files). > 3) Drop the whole "for" loop. Add a QA notice if a dir file is found in the > top-level Info dir (i.e. "${ED%/}"/usr/share/info or "${ED%/}/${infodir#/}"). Update: Leave removing the top-level "${ED}"/usr/share/info/dir* in place, and apply the above only to (n-th level) subdirectories.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=5e58a0d413d4154262f966759d05fe952075c965 commit 5e58a0d413d4154262f966759d05fe952075c965 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2023-04-05 16:36:49 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2023-04-05 16:36:49 +0000 prepinfo: Deprecate According to PMS, calling prepinfo from ebuilds was never allowed. Last usage in Gentoo repository has been removed on 2018-11-22. Bug: https://bugs.gentoo.org/899898 Signed-off-by: Ulrich Müller <ulm@gentoo.org> bin/ebuild-helpers/prepinfo | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) https://gitweb.gentoo.org/proj/portage.git/commit/?id=14fffea2fefa05e84bb1c5b10888031c6b598dfc commit 14fffea2fefa05e84bb1c5b10888031c6b598dfc Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2023-04-05 16:35:01 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2023-04-05 16:35:01 +0000 misc-functions.sh: Inline prepinfo code in install_qa_check() Add a deprecation warning. Presumably, subdirs of /usr/share/info have never been used by any package except app-editors/emacs. Remove duplicate rm statement at the end of the function. Bug: https://bugs.gentoo.org/899898 Signed-off-by: Ulrich Müller <ulm@gentoo.org> bin/misc-functions.sh | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05f0b3b184011060c86787f93e16a29002bdc54a commit 05f0b3b184011060c86787f93e16a29002bdc54a Author: Sam James <sam@gentoo.org> AuthorDate: 2023-04-07 09:59:46 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-04-07 09:59:55 +0000 sys-apps/portage: add 3.0.46 Closes: https://bugs.gentoo.org/861659 Closes: https://bugs.gentoo.org/877271 Closes: https://bugs.gentoo.org/898224 Closes: https://bugs.gentoo.org/899898 Closes: https://bugs.gentoo.org/902189 Closes: https://bugs.gentoo.org/903917 Closes: https://bugs.gentoo.org/903926 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-3.0.46.ebuild | 285 +++++++++++++++++++++++++++++++++ 2 files changed, 286 insertions(+)
I guess I'll keep this open as a reminder to do the removal.