summaryrefslogtreecommitdiff
path: root/eclass/acct-group.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-14 00:01:24 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-14 00:01:24 +0100
commit59c2499e0c9720169c9d5a02168c51c807a21467 (patch)
tree48c68a8a7e0094b2edaace12850e6c059bc3636b /eclass/acct-group.eclass
parenta25cc082a26782e5d39ded4559c91ff11bc3c299 (diff)
gentoo auto-resync : 14:05:2024 - 00:01:24
Diffstat (limited to 'eclass/acct-group.eclass')
-rw-r--r--eclass/acct-group.eclass18
1 files changed, 10 insertions, 8 deletions
diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
index a0ad86066309..2c2c88cfc7e1 100644
--- a/eclass/acct-group.eclass
+++ b/eclass/acct-group.eclass
@@ -1,4 +1,4 @@
-# Copyright 2019-2023 Gentoo Authors
+# Copyright 2019-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: acct-group.eclass
@@ -50,12 +50,12 @@ inherit user-info
# << Eclass variables >>
# @ECLASS_VARIABLE: ACCT_GROUP_NAME
-# @INTERNAL
# @DESCRIPTION:
# The name of the group. This is forced to ${PN} and the policy
-# prohibits it from being changed.
+# prohibits it from being changed. The variable is left writable for
+# use in overlays; package naming restrictions would prohibit some
+# otherwise-valid group names.
ACCT_GROUP_NAME=${PN}
-readonly ACCT_GROUP_NAME
# @ECLASS_VARIABLE: ACCT_GROUP_ID
# @REQUIRED
@@ -96,8 +96,9 @@ acct-group_pkg_pretend() {
[[ ${ACCT_GROUP_ID} -ge -1 ]] || die "Ebuild error: ACCT_GROUP_ID=${ACCT_GROUP_ID} invalid!"
local group_id=${ACCT_GROUP_ID}
- # check for the override
- local override_name=${ACCT_GROUP_NAME^^}
+ # check for the override, use PN in case this is an overlay and
+ # ACCT_GROUP_NAME is not PN and not valid in a bash variable name
+ local override_name=${PN^^}
local override_var=ACCT_GROUP_${override_name//-/_}_ID
if [[ -n ${!override_var} ]]; then
group_id=${!override_var}
@@ -132,8 +133,9 @@ acct-group_pkg_pretend() {
acct-group_src_install() {
debug-print-function ${FUNCNAME} "${@}"
- # check for the override
- local override_name=${ACCT_GROUP_NAME^^}
+ # check for the override, use PN in case this is an overlay and
+ # ACCT_GROUP_NAME is not PN and not valid in a bash variable name
+ local override_name=${PN^^}
local override_var=ACCT_GROUP_${override_name//-/_}_ID
if [[ -n ${!override_var} ]]; then
ewarn "${override_var}=${!override_var} override in effect, support will not be provided."