• [gentoo-dev] [PATCH] user.eclass: Avoid reserved function name

    From =?UTF-8?q?Ulrich=20M=C3=BCller?=@21:1/5 to All on Sun May 15 09:50:01 2022
    Names that contain "ebuild" are reserved for package manager use.

    Closes: https://bugs.gentoo.org/843707
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>
    ---
    eclass/user.eclass | 16 ++++++++--------
    1 file changed, 8 insertions(+), 8 deletions(-)

    diff --git a/eclass/user.eclass b/eclass/user.eclass
    index aab549d0c473..93512d37d055 100644
    --- a/eclass/user.eclass
    +++ b/eclass/user.eclass
    @@ -31,12 +31,12 @@ _USER_ECLASS=1

    inherit user-info

    -# @FUNCTION: _assert_pkg_ebuild_phase
    +# @FUNCTION: _assert_pkg_phase
    # @INTERNAL
    # @USAGE: <calling func name>
    # @DESCRIPTION:
    # Raises an alert if the phase is not suitable for user.eclass usage. -_assert_pkg_ebuild_phase() {
    +_assert_pkg_phase() {
    case ${EBUILD_PHASE} in
    setup|preinst|postinst|prerm|postrm) ;;
    *)
    @@ -89,7 +89,7 @@ enewuser() {
    ewarn "Insufficient privileges to execute ${FUNCNAME[0]}"
    return 0
    fi
    - _assert_pkg_ebuild_phase ${FUNCNAME}
    + _assert_pkg_phase ${FUNCNAME}

    local create_home=1 force_uid=
    while [[ ${1} == -* ]]; do
    @@ -262,7 +262,7 @@ enewgroup() {
    ewarn "Insufficient privileges to execute ${FUNCNAME[0]}"
    return 0
    fi
    - _assert
  • From =?UTF-8?q?Ulrich=20M=C3=BCller?=@21:1/5 to All on Sun May 15 15:30:01 2022
    Names that contain "ebuild" are reserved for package manager use.

    Closes: https://bugs.gentoo.org/843707
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>
    ---
    v2: Prefix the new name with "user".

    eclass/user.eclass | 16 ++++++++--------
    1 file changed, 8 insertions(+), 8 deletions(-)

    diff --git a/eclass/user.eclass b/eclass/user.eclass
    index aab549d0c473..906e84e83c69 100644
    --- a/eclass/user.eclass
    +++ b/eclass/user.eclass
    @@ -31,12 +31,12 @@ _USER_ECLASS=1

    inherit user-info

    -# @FUNCTION: _assert_pkg_ebuild_phase
    +# @FUNCTION: _user_assert_pkg_phase
    # @INTERNAL
    # @USAGE: <calling func name>
    # @DESCRIPTION:
    # Raises an alert if the phase is not suitable for user.eclass usage. -_assert_pkg_ebuild_phase() {
    +_user_assert_pkg_phase() {
    case ${EBUILD_PHASE} in
    setup|preinst|postinst|prerm|postrm) ;;
    *)
    @@ -89,7 +89,7 @@ enewuser() {
    ewarn "Insufficient privileges to execute ${FUNCNAME[0]}"
    return 0
    fi
    - _assert_pkg_ebuild_phase ${FUNCNAME}
    + _user_assert_pkg_phase ${FUNCNAME}

    local create_home=1 force_uid=
    while [[ ${1} == -* ]]; do
    @@ -262,7 +262,7 @@ enewgroup() {
    ewarn "Insufficient privileges t