diff options
Diffstat (limited to 'eclass/udev.eclass')
-rw-r--r-- | eclass/udev.eclass | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/eclass/udev.eclass b/eclass/udev.eclass index ac94f98221aa..9867c68d5836 100644 --- a/eclass/udev.eclass +++ b/eclass/udev.eclass @@ -1,10 +1,10 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: udev.eclass # @MAINTAINER: # systemd@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: Default eclass for determining udev directories. # @DESCRIPTION: # Default eclass for determining udev directories. @@ -36,21 +36,17 @@ # } # @CODE +if [[ -z ${_UDEV_ECLASS} ]]; then +_UDEV_ECLASS=1 + case ${EAPI} in - 5|6|7|8) ;; + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac -if [[ -z ${_UDEV_ECLASS} ]]; then -_UDEV_ECLASS=1 - inherit toolchain-funcs -if [[ ${EAPI} == [56] ]]; then - DEPEND="virtual/pkgconfig" -else - BDEPEND="virtual/pkgconfig" -fi +BDEPEND="virtual/pkgconfig" # @FUNCTION: _udev_get_udevdir # @INTERNAL @@ -71,7 +67,7 @@ _udev_get_udevdir() { # @DESCRIPTION: # Use the short version $(get_udevdir) instead! udev_get_udevdir() { - debug-print-function ${FUNCNAME} "${@}" + debug-print-function ${FUNCNAME} "$@" eerror "This ebuild should be using the get_udevdir() function instead of the deprecated udev_get_udevdir()" die "Deprecated function call: udev_get_udevdir(), please report to (overlay) maintainers." @@ -83,7 +79,7 @@ udev_get_udevdir() { # This function always succeeds, even if udev is not installed. # The fallback value is set to /lib/udev get_udevdir() { - debug-print-function ${FUNCNAME} "${@}" + debug-print-function ${FUNCNAME} "$@" echo "$(_udev_get_udevdir)" } @@ -93,7 +89,7 @@ get_udevdir() { # @DESCRIPTION: # Install udev rule(s). Uses doins, thus it is fatal. udev_dorules() { - debug-print-function ${FUNCNAME} "${@}" + debug-print-function ${FUNCNAME} "$@" ( insopts -m 0644 @@ -107,7 +103,7 @@ udev_dorules() { # @DESCRIPTION: # Install udev rule with a new name. Uses newins, thus it is fatal. udev_newrules() { - debug-print-function ${FUNCNAME} "${@}" + debug-print-function ${FUNCNAME} "$@" ( insopts -m 0644 @@ -122,7 +118,7 @@ udev_newrules() { # Should be called from pkg_postinst and pkg_postrm in packages which install # udev rules or hwdb data. udev_reload() { - if [[ -n ${ROOT%/} ]]; then + if [[ -n ${ROOT} ]]; then return 0 fi |