mirror of
https://github.com/flatcar/scripts.git
synced 2025-12-07 18:31:54 +01:00
eclass/udev: Revert some changes
We still have old EAPIs around, so keep supporting them.
This commit is contained in:
parent
237eaf7d8c
commit
58e3b78944
@ -1,10 +1,15 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
|
||||
# Flatcar: this file is modified to still support old EAPIs and to
|
||||
# still provide the deprecated systemd_dotmpfilesd functions.
|
||||
|
||||
|
||||
# @ECLASS: udev.eclass
|
||||
# @MAINTAINER:
|
||||
# systemd@gentoo.org
|
||||
# @SUPPORTED_EAPIS: 5 6 7 8
|
||||
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
|
||||
# @BLURB: Default eclass for determining udev directories.
|
||||
# @DESCRIPTION:
|
||||
# Default eclass for determining udev directories.
|
||||
@ -28,17 +33,18 @@
|
||||
# }
|
||||
# @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
|
||||
|
||||
if [[ ${EAPI} == [56] ]]; then
|
||||
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=""
|
||||
DEPEND="virtual/pkgconfig"
|
||||
else
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
@ -83,7 +89,8 @@ get_udevdir() {
|
||||
# @FUNCTION: udev_dorules
|
||||
# @USAGE: <rule> [...]
|
||||
# @DESCRIPTION:
|
||||
# Install udev rule(s). Uses doins, thus it is fatal.
|
||||
# Install udev rule(s). Uses doins, thus it is fatal in EAPI 4
|
||||
# and non-fatal in earlier EAPIs.
|
||||
udev_dorules() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
@ -97,7 +104,8 @@ udev_dorules() {
|
||||
# @FUNCTION: udev_newrules
|
||||
# @USAGE: <oldname> <newname>
|
||||
# @DESCRIPTION:
|
||||
# Install udev rule with a new name. Uses newins, thus it is fatal.
|
||||
# Install udev rule with a new name. Uses newins, thus it is fatal
|
||||
# in EAPI 4 and non-fatal in earlier EAPIs.
|
||||
udev_newrules() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user