Summary: | app-portage/elt-patches app-text/ghostscript-gpl-10.03.1 fails to prepare due to: eltpatch failed: "yesno: invalid argument: '/etc/init.d/display-manager'" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | hkBst <mhkbst> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kfm, roman.gruber |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
hkBst
2024-07-25 07:06:38 UTC
Please attach the full, untruncated build.log (as the stack size may matter here). Also, please apply a temporary alteration to /usr/bin/eltpatch, such that the first three lines are as follows. #!/bin/bash PS4='+$BASH_SOURCE:$LINENO:$FUNCNAME: ' set -x Also attached the environment file please. Please change the bug status to UNCONFIRMED once the requested information has been provided. *** Bug 936059 has been marked as a duplicate of this bug. *** The sequence of events is as follows. 1) EINFO_LOG is set to /etc/init.d/display-manager (why remains a mystery) 2) eltpatch calls esyslog() 3) esyslog() calls yesno() 4) yesno() checks whether EINFO_LOG refers to a valid identifier on second pass 5) the value is not a valid identifier; die() is called 6) the die() function got overridden by eltpatch and is duly called 7) the die() function calls eerror() 8) eerror() calls esyslog() 9) infinite recursion occurs until bash runs out of stack space Regarding #5, having yesno() die wasn't a great idea. It was made a warning on the 11th June but there needs to be a new release of gentoo-functions for that change to be realised at large. Regarding #8, to write a die() function that calls back into gentoo-functions in any capacity is a bad thing to do, irrespective of the circumstances. The die() function in gentoo-functions specifically refrains from doing this. For now, I think that the appropriate thing to do would be twofold: - make eltpatch die() use printf >&2, just as gentoo-functions does - declare eltpatch die() prior to sourcing functions.sh, not afterwards It would also be good to tag a new gentoo-functions release at some point in the near future. Eventually, it will become feasible to remove the declaration of die() from eltpatch altogether. All of the above aside, those that are reporting this issue would be well advised to find out how and why EINFO_LOG is set to such a value and to prevent it from happening. ... P.S. I think that the behaviour of yesno() whereby it falls back to treating the value as a potential identifier is a misfeature and would like to remove it. The problem is that I don't know for certain that there is no code in the wild expecting for this long-standing behaviour to occur. I have not seen any. (In reply to RumpletonBongworth from comment #6) > The die() function in gentoo-functions specifically refrains from doing this. Other than to call quote_args, that is. However, it is by design and has no effect on control flow. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7107c20c6b3e3e4b656941d395970904059c277 commit a7107c20c6b3e3e4b656941d395970904059c277 Author: Kerin Millar <kfm@plushkava.net> AuthorDate: 2024-07-28 21:47:17 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-07-29 17:29:18 +0000 sys-apps/gentoo-functions: revise 1.6 as 1.6-r1 This revision backports a few patches to prevent ~arch keyword users with unusual EINFO_LOG declarations from being affected by bug #936613. Closes: https://bugs.gentoo.org/936613 Signed-off-by: Kerin Millar <kfm@plushkava.net> Signed-off-by: Sam James <sam@gentoo.org> .../gentoo-functions-1.6-add-warn-function.patch | 34 +++ ...-functions-1.6-relax-parameter-validation.patch | 233 +++++++++++++++++++++ ...s-1.6.ebuild => gentoo-functions-1.6-r1.ebuild} | 5 + 3 files changed, 272 insertions(+) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=d6e689bc832e4b033f4af9cb6746a99649ecc8d8 commit d6e689bc832e4b033f4af9cb6746a99649ecc8d8 Author: Kerin Millar <kfm@plushkava.net> AuthorDate: 2024-07-31 23:20:10 +0000 Commit: Kerin Millar <kfm@plushkava.net> CommitDate: 2024-07-31 23:36:10 +0000 Treat EINFO_LOG as false if equal to RC_SERVICE Consider the value of EINFO_LOG to be false in the event that it is equal to the value of RC_SERVICE. The reason for this is that, as of the time of writing, openrc-run(8) defines and uses EINFO_LOG in a way that is at odds with gentoo-functions. Ideally, the behaviour of OpenRC would be modified so that it becomes possible to jettison this workaround. Fixes: 0dd8364c03c6f8737150ee4f146ddeeec57efee9 Bug: https://bugs.gentoo.org/936613 Signed-off-by: Kerin Millar <kfm@plushkava.net> functions/rc.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) |