summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2022-05-15 13:19:55 +0000
committerSam James <sam@gentoo.org>2022-05-16 23:29:29 +0000
commit949f1967cfbe394838ddaa39678b908f3e50bccf (patch)
tree62eb97dd2014ad432a98d82d3af4c699e5336c5b /eclass/user.eclass
parenttoolchain-funcs.eclass: document proper tc-check-openmp use (diff)
downloadgentoo-949f1967cfbe394838ddaa39678b908f3e50bccf.tar.gz
gentoo-949f1967cfbe394838ddaa39678b908f3e50bccf.tar.bz2
gentoo-949f1967cfbe394838ddaa39678b908f3e50bccf.zip
user.eclass: Avoid reserved function name
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> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/user.eclass')
-rw-r--r--eclass/user.eclass16
1 files 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 to execute ${FUNCNAME[0]}"
return 0
fi
- _assert_pkg_ebuild_phase ${FUNCNAME}
+ _user_assert_pkg_phase ${FUNCNAME}
local force_gid=
while [[ ${1} == -* ]]; do
@@ -365,7 +365,7 @@ enewgroup() {
# If the new home directory does not exist, it is created.
# Any previously existing home directory is NOT moved.
esethome() {
- _assert_pkg_ebuild_phase ${FUNCNAME}
+ _user_assert_pkg_phase ${FUNCNAME}
# get the username
local euser=${1}; shift
@@ -451,7 +451,7 @@ esethome() {
# Required parameters is the username and the new shell.
# Specify -1 if you want to set shell to platform-specific nologin.
esetshell() {
- _assert_pkg_ebuild_phase ${FUNCNAME}
+ _user_assert_pkg_phase ${FUNCNAME}
# get the username
local euser=${1}; shift
@@ -528,7 +528,7 @@ esetshell() {
# Update the comment field in a platform-agnostic way.
# Required parameters is the username and the new comment.
esetcomment() {
- _assert_pkg_ebuild_phase ${FUNCNAME}
+ _user_assert_pkg_phase ${FUNCNAME}
# get the username
local euser=${1}; shift
@@ -602,7 +602,7 @@ esetcomment() {
# Required parameters is the username and the new list of groups,
# primary group first.
esetgroups() {
- _assert_pkg_ebuild_phase ${FUNCNAME}
+ _user_assert_pkg_phase ${FUNCNAME}
[[ ${#} -eq 2 ]] || die "Usage: ${FUNCNAME} <user> <groups>"