diff options
| author | Crucible <crucible@localhost> | 2026-09-22 18:47:35 -0500 |
|---|---|---|
| committer | Crucible <crucible@localhost> | 2026-09-22 18:47:35 -0500 |
| commit | cde96c5ea0c81397fd3214d455a374f76179a7aa (patch) | |
| tree | 12c86d59eb88887c244b1145411db084ae5a6c1f /eclass | |
| parent | 47516b9667518dacb1efd6d257f7b3e6a481ec93 (diff) | |
| download | baldeagleos-repo-cde96c5ea0c81397fd3214d455a374f76179a7aa.tar.gz baldeagleos-repo-cde96c5ea0c81397fd3214d455a374f76179a7aa.tar.xz baldeagleos-repo-cde96c5ea0c81397fd3214d455a374f76179a7aa.zip | |
Publish baldeagleos-repo candidate 0000000325-20260922-184323
Diffstat (limited to 'eclass')
| -rw-r--r-- | eclass/acct-group.eclass | 1 | ||||
| -rw-r--r-- | eclass/acct-user.eclass | 2 | ||||
| -rw-r--r-- | eclass/autotools.eclass | 2 | ||||
| -rw-r--r-- | eclass/edo.eclass | 61 | ||||
| -rw-r--r-- | eclass/edob.eclass | 81 |
5 files changed, 92 insertions, 55 deletions
diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass index 487d80e43097..c3c78e629bd8 100644 --- a/eclass/acct-group.eclass +++ b/eclass/acct-group.eclass @@ -85,6 +85,7 @@ ACCT_GROUP_NAME=${PN} : "${KEYWORDS:=~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris}" S=${WORKDIR} +IDEPEND="!prefix? ( >=sys-apps/shadow-4.6 )" # << Phase functions >> diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass index 34f9a7f0b9b6..cf9339a7bfcb 100644 --- a/eclass/acct-user.eclass +++ b/eclass/acct-user.eclass @@ -151,7 +151,7 @@ ACCT_USER_NAME=${PN} : "${KEYWORDS:=~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris}" S=${WORKDIR} -IDEPEND=">=sys-apps/shadow-4.6" +IDEPEND="!prefix? ( >=sys-apps/shadow-4.6 )" # << API functions >> diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass index b80dc2f04412..0134ece7a3be 100644 --- a/eclass/autotools.eclass +++ b/eclass/autotools.eclass @@ -93,7 +93,7 @@ _LATEST_AUTOCONF=( 2.73:2.73 2.72-r1:2.72 ) # Do NOT change this variable in your ebuilds! # If you want to force a newer minor version, you can specify the correct # WANT value by using a colon: <PV>:<WANT_AUTOMAKE> -_LATEST_AUTOMAKE=( 1.18.1:1.18 ) +_LATEST_AUTOMAKE=( 1.19:1.19 1.18.1:1.18 ) _automake_atom="dev-build/automake" _autoconf_atom="dev-build/autoconf" diff --git a/eclass/edo.eclass b/eclass/edo.eclass index a308851aca7f..43d05e010005 100644 --- a/eclass/edo.eclass +++ b/eclass/edo.eclass @@ -1,4 +1,4 @@ -# Copyright 2022-2025 Gentoo Authors +# Copyright 2022-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: edo.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Sam James <sam@gentoo.org> # @SUPPORTED_EAPIS: 7 8 +# @PROVIDES: edob # @BLURB: Convenience function to run commands verbosely and die on failure # @DESCRIPTION: # This eclass provides the 'edo' command, and an 'edob' variant for ebegin/eend, @@ -22,6 +23,10 @@ # those commands produce output. The 'edob' command will suppress the # command's output and only present it if the command returned with a # non-zero exit status. +# +# Note that starting with EAPI 9, the edo command is provided by the +# package manager. If you need the edob command in EAPI 9 ebuilds or +# eclasses, then inherit edob.eclass directly. case ${EAPI} in 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; @@ -30,6 +35,8 @@ esac if [[ -z ${_EDO_ECLASS} ]] ; then _EDO_ECLASS=1 +inherit edob + # @FUNCTION: edo # @USAGE: <command> [<args>...] # @DESCRIPTION: @@ -58,56 +65,4 @@ edo() { "$@" || die -n "Failed to run command: ${1}" } -# @FUNCTION: edob -# @USAGE: [-l <log-name>] [-m <message>] <command> [<args>...] -# @DESCRIPTION: -# Executes 'command' with ebegin & eend with any given arguments and exits -# on failure unless called under 'nonfatal'. This function redirects -# stdout and stderr to a log file. The content of the log file is shown -# if the command returns with a non-zero exit status. -# -# If -m <message> is provided, then invokes ebegin with <message>, otherwise -# a default message is used. If -l <log-name> is provided, then <log-name> is -# used to construct the name of the log file where stdout and stderr of the -# command is redirected to. -edob() { - local message - local log_name - - while true; do - case "${1}" in - -l|-m) - [[ $# -lt 2 ]] && die "Must provide an argument to ${1}" - case "${1}" in - -l) - log_name="${2}" - ;; - -m) - message="${2}" - ;; - esac - shift 2 - ;; - *) - break - ;; - esac - done - - [[ -z ${message} ]] && message="Running $@" - [[ -z ${log_name} ]] && log_name="$(basename ${1})" - - local log_file="${T}/${log_name}.log" - - ebegin "${message}" - - "$@" &> "${log_file}" - local ret=$? - - if ! eend $ret; then - cat "${log_file}" - die -n "Command \"$@\" failed with exit status $ret" - fi -} - fi diff --git a/eclass/edob.eclass b/eclass/edob.eclass new file mode 100644 index 000000000000..5d13af1fcbe8 --- /dev/null +++ b/eclass/edob.eclass @@ -0,0 +1,81 @@ +# Copyright 2022-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: edob.eclass +# @MAINTAINER: +# QA Team <qa@gentoo.org> +# @AUTHOR: +# Sam James <sam@gentoo.org> +# Florian Schmaus <flow@gentoo.org> +# @SUPPORTED_EAPIS: 7 8 9 +# @BLURB: Wrap output-producing commands in ebegin/eend +# @DESCRIPTION: +# This eclass provides the edob command for ebegin/eend, +# which logs the command used verbosely and dies (exits) on failure. +# +# The edob command can be used for long running commands, even if +# those commands produce output. The edob command will suppress the +# command's output and only present it if the command returned with a +# non-zero exit status. +case ${EAPI} in + 7|8|9) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_EDOB_ECLASS} ]] ; then +_EDOB_ECLASS=1 + +# @FUNCTION: edob +# @USAGE: [-l <log-name>] [-m <message>] <command> [<args>...] +# @DESCRIPTION: +# Executes 'command' with any given arguments wrapped in ebegin and +# eend. Aborts on failure unless called under 'nonfatal'. +# Furthermore, redirects stdout and stderr to a log file. The content +# of the log file is shown if the command returns with a non-zero exit +# status. +# +# If -m <message> is provided, then invokes ebegin with <message>, otherwise +# a default message is used. If -l <log-name> is provided, then <log-name> is +# used to construct the name of the log file to which stdout and stderr of the +# command is redirected to. +edob() { + local message + local log_name + + while true; do + case "${1}" in + -l|-m) + [[ $# -lt 2 ]] && die "Must provide an argument to ${1}" + case "${1}" in + -l) + log_name="${2}" + ;; + -m) + message="${2}" + ;; + esac + shift 2 + ;; + *) + break + ;; + esac + done + + [[ -z ${message} ]] && message="Running $@" + [[ -z ${log_name} ]] && log_name="$(basename ${1})" + + local log_file="${T}/${log_name}.log" + + ebegin "${message}" + + "$@" &> "${log_file}" + local ret=$? + + if ! eend $ret; then + cat "${log_file}" + die -n "Command \"$@\" failed with exit status $ret" + fi +} + +fi |
