summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-10-19 15:33:25 +0200
committerMichał Górny <mgorny@gentoo.org>2022-10-19 15:34:41 +0200
commit422ac44801de3ea10c16371a717aed7129346184 (patch)
tree8e26969cb50ab4b681eac6365da19554c249cd76 /eclass/acct-user.eclass
parentacct-user.eclass: Revert "respect ACCT_USER_NO_MODIFY in pkg_prerm" (diff)
downloadgentoo-422ac44801de3ea10c16371a717aed7129346184.tar.gz
gentoo-422ac44801de3ea10c16371a717aed7129346184.tar.bz2
gentoo-422ac44801de3ea10c16371a717aed7129346184.zip
acct-user.eclass: Revert "support user override of comment"
Reverts: 140f92c2b8a15e7e5c28a343a8b289b3d766e143 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/acct-user.eclass')
-rw-r--r--eclass/acct-user.eclass17
1 files changed, 3 insertions, 14 deletions
diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
index f48e5a105a46..c87b27f3ccaa 100644
--- a/eclass/acct-user.eclass
+++ b/eclass/acct-user.eclass
@@ -93,13 +93,6 @@ readonly ACCT_USER_NAME
# to an already existing user.
: ${ACCT_USER_NO_MODIFY:=}
-# @ECLASS_VARIABLE: ACCT_USER_COMMENT
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The comment to use for the user. If not specified, the package
-# DESCRIPTION will be used. This can be overridden in make.conf through
-# ACCT_USER_<UPPERCASE_USERNAME>_COMMENT variable.
-
# @ECLASS_VARIABLE: ACCT_USER_SHELL
# @DESCRIPTION:
# The shell to use for the user. If not specified, a 'nologin' variant
@@ -380,10 +373,6 @@ acct-user_pkg_pretend() {
acct-user_src_install() {
debug-print-function ${FUNCNAME} "${@}"
- # Replace reserved characters in comment
- : ${ACCT_USER_COMMENT:=${DESCRIPTION}}
- ACCT_USER_COMMENT=${ACCT_USER_COMMENT//[:,=]/;}
-
# serialize for override support
local ACCT_USER_GROUPS=${ACCT_USER_GROUPS[*]}
@@ -391,7 +380,7 @@ acct-user_src_install() {
local override_name=${ACCT_USER_NAME^^}
override_name=${override_name//-/_}
local var
- for var in ACCT_USER_{ID,COMMENT,SHELL,HOME{,_OWNER,_PERMS},GROUPS}; do
+ for var in ACCT_USER_{ID,SHELL,HOME{,_OWNER,_PERMS},GROUPS}; do
local var_name=ACCT_USER_${override_name}_${var#ACCT_USER_}
if [[ -n ${!var_name} ]]; then
ewarn "${var_name}=${!var_name} override in effect, support will not be provided."
@@ -420,7 +409,7 @@ acct-user_src_install() {
printf "u\t%q\t%q\t%q\t%q\t%q\n" \
"${ACCT_USER_NAME}" \
"${_ACCT_USER_ID/#-*/-}:${groups[0]}" \
- "${_ACCT_USER_COMMENT}" \
+ "${DESCRIPTION//[:,=]/;}" \
"${_ACCT_USER_HOME}" \
"${_ACCT_USER_SHELL/#-*/-}"
if [[ ${#groups[@]} -gt 1 ]]; then
@@ -498,7 +487,7 @@ acct-user_pkg_postinst() {
esetshell "${ACCT_USER_NAME}" "${_ACCT_USER_SHELL}"
esetgroups "${ACCT_USER_NAME}" "${_ACCT_USER_GROUPS// /,}"
# comment field can not contain colons
- esetcomment "${ACCT_USER_NAME}" "${_ACCT_USER_COMMENT}"
+ esetcomment "${ACCT_USER_NAME}" "${DESCRIPTION//[:,=]/;}"
eunlockuser "${ACCT_USER_NAME}"
}