Skip to content

Commit

Permalink
eclass: canonicalize debug-print-function calls
Browse files Browse the repository at this point in the history
Closes: gentoo#37652
Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
SoapGentoo committed Oct 8, 2024
1 parent ec9bd06 commit c8af7eb
Show file tree
Hide file tree
Showing 58 changed files with 402 additions and 402 deletions.
6 changes: 3 additions & 3 deletions eclass/acct-group.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ S=${WORKDIR}
# Performs sanity checks for correct eclass usage, and early-checks
# whether requested GID can be enforced.
acct-group_pkg_pretend() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

# verify ACCT_GROUP_ID
[[ -n ${ACCT_GROUP_ID} ]] || die "Ebuild error: ACCT_GROUP_ID must be set!"
Expand Down Expand Up @@ -131,7 +131,7 @@ acct-group_pkg_pretend() {
# @DESCRIPTION:
# Installs sysusers.d file for the group.
acct-group_src_install() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

# 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
Expand All @@ -156,7 +156,7 @@ acct-group_src_install() {
# @DESCRIPTION:
# Creates the group if it does not exist yet.
acct-group_pkg_preinst() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

if [[ ${EUID} -ne 0 || -n ${EPREFIX} ]]; then
einfo "Insufficient privileges to execute ${FUNCNAME[0]}"
Expand Down
12 changes: 6 additions & 6 deletions eclass/acct-user.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ S=${WORKDIR}
# Generate appropriate RDEPEND from ACCT_USER_GROUPS. This must be
# called if ACCT_USER_GROUPS are set.
acct-user_add_deps() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

# ACCT_USER_GROUPS sanity check
if [[ $(declare -p ACCT_USER_GROUPS) != "declare -a"* ]]; then
Expand Down Expand Up @@ -218,7 +218,7 @@ eislocked() {
# Performs sanity checks for correct eclass usage, and early-checks
# whether requested UID can be enforced.
acct-user_pkg_pretend() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

# verify that acct-user_add_deps() has been called
# (it verifies ACCT_USER_GROUPS itself)
Expand Down Expand Up @@ -267,7 +267,7 @@ acct-user_pkg_pretend() {
# Installs a keep-file into the user's home directory to ensure it is
# owned by the package, and sysusers.d file.
acct-user_src_install() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

# Replace reserved characters in comment
: "${ACCT_USER_COMMENT:=${DESCRIPTION//[:,=]/;}}"
Expand Down Expand Up @@ -328,7 +328,7 @@ acct-user_src_install() {
# Creates the user if it does not exist yet. Sets permissions
# of the home directory in install image.
acct-user_pkg_preinst() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

unset _ACCT_USER_ADDED

Expand Down Expand Up @@ -397,7 +397,7 @@ acct-user_pkg_preinst() {
# Updates user properties if necessary. This needs to be done after
# new home directory is installed.
acct-user_pkg_postinst() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

if [[ -n ${_ACCT_USER_ADDED} ]]; then
# We just added the user; no need to update it
Expand Down Expand Up @@ -481,7 +481,7 @@ acct-user_pkg_postinst() {
# @DESCRIPTION:
# Ensures that the user account is locked out when it is removed.
acct-user_pkg_prerm() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

if [[ -n ${REPLACED_BY_VERSION} ]]; then
return
Expand Down
10 changes: 5 additions & 5 deletions eclass/ada.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ readonly _ADA_ALL_IMPLS
# unsupported, returns 1 -- and the caller should ignore the entry.
# If it is invalid, dies with an appropriate error message.
_ada_impl_supported() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

[[ ${#} -eq 1 ]] || die "${FUNCNAME}: takes exactly 1 argument (impl)."

Expand Down Expand Up @@ -208,7 +208,7 @@ _ada_set_impls() {
# They are described more completely in the eclass
# variable documentation.
ada_export() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

local impl var

Expand Down Expand Up @@ -404,7 +404,7 @@ unset -f _ada_single_set_globals
# setup will be done. If wrapper update is requested, the directory
# shall be removed first.
ada_wrapper_setup() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

local workdir=${1:-${T}/${EADA}}
local impl=${2:-${EADA}}
Expand Down Expand Up @@ -470,7 +470,7 @@ ada_wrapper_setup() {
# Determine what the selected Ada implementation is and set
# the Ada build environment up for it.
ada_setup() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

unset EADA

Expand Down Expand Up @@ -518,7 +518,7 @@ ada_setup() {
# @DESCRIPTION:
# Runs ada_setup.
ada_pkg_setup() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

[[ ${MERGE_TYPE} != binary ]] && ada_setup
}
Expand Down
12 changes: 6 additions & 6 deletions eclass/apache-module.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ inherit depend.apache

# Internal function to construct the default ${APXS2_S} path if required.
apache_cd_dir() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

local CD_DIR="${APXS2_S}"

Expand All @@ -123,7 +123,7 @@ apache_cd_dir() {

# Internal function to construct the default ${APACHE2_MOD_FILE} if required.
apache_mod_file() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

local MOD_FILE="${APACHE2_MOD_FILE:-$(apache_cd_dir)/.libs/${PN}.so}"

Expand All @@ -135,7 +135,7 @@ apache_mod_file() {
# optional first argument `html'; if the first argument is equals `html', only
# html files are returned, otherwise normal (non-html) docs are returned.
apache_doc_magic() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

local DOCS=

Expand All @@ -161,7 +161,7 @@ apache_doc_magic() {
# module requires a different build setup than this, use ${APXS} in your own
# src_compile routine.
apache-module_src_compile() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

local CD_DIR=$(apache_cd_dir)
cd "${CD_DIR}" || die "cd ${CD_DIR} failed"
Expand All @@ -180,7 +180,7 @@ apache-module_src_compile() {
# 55_mod_foo.conf, APACHE2_MOD_CONF would be 55_mod_foo. ${DOCFILES} contains
# the list of files you want filed as documentation.
apache-module_src_install() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

local CD_DIR=$(apache_cd_dir)
pushd "${CD_DIR}" >/dev/null || die "cd ${CD_DIR} failed"
Expand Down Expand Up @@ -222,7 +222,7 @@ apache-module_src_install() {
# @DESCRIPTION:
# This prints out information about the installed module and how to enable it.
apache-module_pkg_postinst() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

if [[ -n "${APACHE2_MOD_DEFINE}" ]] ; then
local my_opts="-D ${APACHE2_MOD_DEFINE// / -D }"
Expand Down
4 changes: 2 additions & 2 deletions eclass/app-alternatives.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ _APP_ALTERNATIVES_ECLASS=1
# @DESCRIPTION:
# Set ebuild metadata variables.
_app-alternatives_set_globals() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

if [[ ${ALTERNATIVES@a} != *a* ]]; then
die 'ALTERNATIVES must be an array.'
Expand Down Expand Up @@ -71,7 +71,7 @@ _app-alternatives_set_globals
# @DESCRIPTION:
# Get the flag name for the selected alternative (i.e. the USE flag set).
get_alternative() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

local flag
for flag in "${ALTERNATIVES[@]%%:*}"; do
Expand Down
16 changes: 8 additions & 8 deletions eclass/bash-completion-r1.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ esac
# @EXAMPLE:
# _bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion
_bash-completion-r1_get_bashdir() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

if $(tc-getPKG_CONFIG) --exists bash-completion &>/dev/null; then
local path
Expand All @@ -59,7 +59,7 @@ _bash-completion-r1_get_bashdir() {
# @DESCRIPTION:
# Get unprefixed bash-completion completions directory.
_bash-completion-r1_get_bashcompdir() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

_bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion/completions
}
Expand All @@ -69,7 +69,7 @@ _bash-completion-r1_get_bashcompdir() {
# @DESCRIPTION:
# Get unprefixed bash-completion helpers directory.
_bash-completion-r1_get_bashhelpersdir() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

_bash-completion-r1_get_bashdir helpersdir /usr/share/bash-completion/helpers
}
Expand All @@ -78,7 +78,7 @@ _bash-completion-r1_get_bashhelpersdir() {
# @DESCRIPTION:
# Get the bash-completion completions directory.
get_bashcompdir() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

echo "${EPREFIX}$(_bash-completion-r1_get_bashcompdir)"
}
Expand All @@ -88,7 +88,7 @@ get_bashcompdir() {
# @DESCRIPTION:
# Get the bash-completion helpers directory.
get_bashhelpersdir() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

echo "${EPREFIX}$(_bash-completion-r1_get_bashhelpersdir)"
}
Expand All @@ -99,7 +99,7 @@ get_bashhelpersdir() {
# Install bash-completion files passed as args. Has EAPI-dependent failure
# behavior (like doins).
dobashcomp() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

(
insopts -m 0644
Expand All @@ -114,7 +114,7 @@ dobashcomp() {
# Install bash-completion file under a new name. Has EAPI-dependent failure
# behavior (like newins).
newbashcomp() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

(
insopts -m 0644
Expand All @@ -128,7 +128,7 @@ newbashcomp() {
# @DESCRIPTION:
# Alias <basename> completion to one or more commands (<alias>es).
bashcomp_alias() {
debug-print-function ${FUNCNAME} "${@}"
debug-print-function ${FUNCNAME} "$@"

[[ ${#} -lt 2 ]] && die "Usage: ${FUNCNAME} <basename> <alias>..."
local base=${1} f
Expand Down
28 changes: 14 additions & 14 deletions eclass/depend.apache.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ APACHE2_4_DEPEND="=www-servers/apache-2.4*"
# ==============================================================================

_init_apache2() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

# WARNING: Do not use these variables with anything that is put
# into the dependency cache (DEPEND/RDEPEND/etc)
Expand All @@ -143,7 +143,7 @@ _init_apache2_late() {
}

_init_no_apache() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"
APACHE_VERSION="0"
}

Expand All @@ -158,7 +158,7 @@ _init_no_apache() {
# apache-2.x support. If the myiuse parameter is not given it defaults to
# apache2.
depend.apache_pkg_setup() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

if [[ "${EBUILD_PHASE}" != "setup" ]]; then
die "$FUNCNAME() should be called in pkg_setup()"
Expand All @@ -184,7 +184,7 @@ depend.apache_pkg_setup() {
# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup()
# with the same myiuse parameter.
want_apache() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"
want_apache2 "$@"
}

Expand All @@ -196,7 +196,7 @@ want_apache() {
# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup()
# with the same myiuse parameter.
want_apache2() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

local myiuse=${1:-apache2}
IUSE="${IUSE} ${myiuse}"
Expand All @@ -213,7 +213,7 @@ want_apache2() {
# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup()
# with the same myiuse parameter.
want_apache2_2() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

case ${EAPI} in
7)
Expand All @@ -237,7 +237,7 @@ want_apache2_2() {
# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup()
# with the same myiuse parameter.
want_apache2_4() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

local myiuse=${1:-apache2}
IUSE="${IUSE} ${myiuse}"
Expand All @@ -249,15 +249,15 @@ want_apache2_4() {
# @DESCRIPTION:
# An ebuild calls this to get the dependency information for apache.
need_apache() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"
need_apache2
}

# @FUNCTION: need_apache2
# @DESCRIPTION:
# An ebuild calls this to get the dependency information for apache-2.x.
need_apache2() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

DEPEND="${DEPEND} ${APACHE2_DEPEND}"
RDEPEND="${RDEPEND} ${APACHE2_DEPEND}"
Expand All @@ -268,7 +268,7 @@ need_apache2() {
# @DESCRIPTION:
# An ebuild calls this to get the dependency information for apache-2.2.x.
need_apache2_2() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

case ${EAPI} in
7)
Expand All @@ -286,7 +286,7 @@ need_apache2_2() {
# @DESCRIPTION:
# An ebuild calls this to get the dependency information for apache-2.4.x.
need_apache2_4() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

DEPEND="${DEPEND} ${APACHE2_4_DEPEND}"
RDEPEND="${RDEPEND} ${APACHE2_4_DEPEND}"
Expand All @@ -299,7 +299,7 @@ need_apache2_4() {
# dependency without USE-flag, in which case want_apache does not work.
# DO NOT call this function in global scope.
has_apache() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

if has_version '>=www-servers/apache-2'; then
_init_apache2
Expand All @@ -315,7 +315,7 @@ has_apache() {
# built with a threaded MPM. If the myflag parameter is not given it defaults to
# threads.
has_apache_threads() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

if ! has_version 'www-servers/apache[threads]'; then
return
Expand All @@ -338,7 +338,7 @@ has_apache_threads() {
# package if apache has been built with a threaded MPM. If the myflag parameter
# is not given it defaults to threads.
has_apache_threads_in() {
debug-print-function $FUNCNAME $*
debug-print-function ${FUNCNAME} "$@"

if ! has_version 'www-servers/apache[threads]'; then
return
Expand Down
Loading

0 comments on commit c8af7eb

Please sign in to comment.