forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This also drops EAPIs < 5 to match toolchain-funcs.eclass. Signed-off-by: David Michael <[email protected]> Signed-off-by: Mike Gilbert <[email protected]>
- Loading branch information
Showing
1 changed file
with
11 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# Copyright 1999-2018 Gentoo Authors | ||
# Copyright 1999-2021 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
# @ECLASS: udev.eclass | ||
# @MAINTAINER: | ||
# [email protected] | ||
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 | ||
# @SUPPORTED_EAPIS: 5 6 7 8 | ||
# @BLURB: Default eclass for determining udev directories. | ||
# @DESCRIPTION: | ||
# Default eclass for determining udev directories. | ||
|
@@ -28,18 +28,17 @@ | |
# } | ||
# @CODE | ||
|
||
case ${EAPI} in | ||
5|6|7|8) ;; | ||
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; | ||
esac | ||
|
||
if [[ -z ${_UDEV_ECLASS} ]]; then | ||
_UDEV_ECLASS=1 | ||
|
||
inherit toolchain-funcs | ||
|
||
case ${EAPI:-0} in | ||
0|1|2|3|4|5|6|7) ;; | ||
*) die "${ECLASS}.eclass API in EAPI ${EAPI} not yet established." | ||
esac | ||
|
||
if [[ ${EAPI:-0} == [0123456] ]]; then | ||
RDEPEND="" | ||
if [[ ${EAPI} == [56] ]]; then | ||
DEPEND="virtual/pkgconfig" | ||
else | ||
BDEPEND="virtual/pkgconfig" | ||
|
@@ -82,8 +81,7 @@ get_udevdir() { | |
# @FUNCTION: udev_dorules | ||
# @USAGE: <rule> [...] | ||
# @DESCRIPTION: | ||
# Install udev rule(s). Uses doins, thus it is fatal in EAPI 4 | ||
# and non-fatal in earlier EAPIs. | ||
# Install udev rule(s). Uses doins, thus it is fatal. | ||
udev_dorules() { | ||
debug-print-function ${FUNCNAME} "${@}" | ||
|
||
|
@@ -97,8 +95,7 @@ udev_dorules() { | |
# @FUNCTION: udev_newrules | ||
# @USAGE: <oldname> <newname> | ||
# @DESCRIPTION: | ||
# Install udev rule with a new name. Uses newins, thus it is fatal | ||
# in EAPI 4 and non-fatal in earlier EAPIs. | ||
# Install udev rule with a new name. Uses newins, thus it is fatal. | ||
udev_newrules() { | ||
debug-print-function ${FUNCNAME} "${@}" | ||
|
||
|
@@ -113,7 +110,7 @@ udev_newrules() { | |
# @DESCRIPTION: | ||
# Run udevadm control --reload to refresh rules and databases | ||
udev_reload() { | ||
if [[ ${ROOT} != "" ]] && [[ ${ROOT} != "/" ]]; then | ||
if [[ -n ${ROOT%/} ]]; then | ||
return 0 | ||
fi | ||
|
||
|