Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #304 from flatcar-linux/krnowak/sync-udev-eclass
Browse files Browse the repository at this point in the history
eclass/udev: Sync with gentoo
  • Loading branch information
krnowak authored Mar 10, 2022
2 parents 05bb2c9 + 2eda4cb commit e2e2dc1
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions eclass/udev.eclass
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# 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.


# @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.
Expand All @@ -32,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"
Expand Down Expand Up @@ -88,8 +83,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} "${@}"

Expand All @@ -103,8 +97,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} "${@}"

Expand Down

0 comments on commit e2e2dc1

Please sign in to comment.