PMS states: | Indicates that the process begun with an ebegin message has completed. Takes one fixed argument, which is a numeric return code [...] However, Portage makes that argument optional and defaults to 0. This is very error prone, and leads to many ebuilds not passing the required argument, and in some cases, wrongly assuming eend will take $? rather than the absurd default of 0.
Created attachment 737227 [details, diff] eend: Output QA notice when called without argument Maybe we could start with printing a QA notice. See attached patch.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=95cd9583d415dfeb07917d7b111502f0b991413d commit 95cd9583d415dfeb07917d7b111502f0b991413d Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2021-09-03 16:03:27 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2021-09-27 11:15:04 +0000 eend: Output QA notice when called without argument PMS says about eend: "Takes one fixed argument, which is a numeric return code, and an optional message in all subsequent arguments." Bug: https://bugs.gentoo.org/703520 Signed-off-by: Ulrich Müller <ulm@gentoo.org> bin/isolated-functions.sh | 1 + 1 file changed, 1 insertion(+)
pkgcheck detects this as https://github.com/pkgcore/pkgcheck/pull/365 (MissingEendArgument). IIRC we don't have any violators in tree now.
So, do we just close this (leaving the QA warning in place), or should we make calling eend without numerical first argument an error?
(In reply to Ulrich Müller from comment #4) > So, do we just close this (leaving the QA warning in place), or should we > make calling eend without numerical first argument an error? The latter IMO.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=9f877651bfd0940cdf271456425edbbec7fc60bd commit 9f877651bfd0940cdf271456425edbbec7fc60bd Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2024-12-14 17:31:39 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2024-12-14 22:18:53 +0000 eend: Make missing argument an error PMS says about eend: "Takes one fixed argument, which is a numeric return code, and an optional message in all subsequent arguments." A QA notice was in place since commit 95cd9583d415 in 2021. Bug: https://bugs.gentoo.org/703520 Signed-off-by: Ulrich Müller <ulm@gentoo.org> NEWS | 2 ++ bin/isolated-functions.sh | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03f41049a0fe0632eabd8cddaaca898e45943201 commit 03f41049a0fe0632eabd8cddaaca898e45943201 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-01-22 00:29:50 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-01-22 00:30:02 +0000 sys-apps/portage: add 3.0.67 Closes: https://bugs.gentoo.org/703520 Closes: https://bugs.gentoo.org/707980 Closes: https://bugs.gentoo.org/904702 Closes: https://bugs.gentoo.org/906044 Closes: https://bugs.gentoo.org/923530 Closes: https://bugs.gentoo.org/938164 Closes: https://bugs.gentoo.org/939299 Closes: https://bugs.gentoo.org/940120 Closes: https://bugs.gentoo.org/942512 Closes: https://bugs.gentoo.org/942760 Closes: https://bugs.gentoo.org/945382 Closes: https://bugs.gentoo.org/945861 Closes: https://bugs.gentoo.org/946326 Closes: https://bugs.gentoo.org/947822 Closes: https://bugs.gentoo.org/948067 Closes: https://bugs.gentoo.org/939444 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-3.0.67.ebuild | 231 +++++++++++++++++++++++++++++++++ 2 files changed, 232 insertions(+)