1 |
This also drops EAPIs < 5 to match toolchain-funcs.eclass. |
2 |
|
3 |
Signed-off-by: David Michael <fedora.dm0@×××××.com> |
4 |
--- |
5 |
|
6 |
This probably could have been sent in a series with |
7 |
https://archives.gentoo.org/gentoo-dev/message/22db5157cab5d6d173483fbc16377081 |
8 |
|
9 |
eclass/udev.eclass | 25 +++++++++++-------------- |
10 |
1 file changed, 11 insertions(+), 14 deletions(-) |
11 |
|
12 |
diff --git a/eclass/udev.eclass b/eclass/udev.eclass |
13 |
index 2873ae9a92c..7d5f59ab8d9 100644 |
14 |
--- a/eclass/udev.eclass |
15 |
+++ b/eclass/udev.eclass |
16 |
@@ -1,10 +1,10 @@ |
17 |
-# Copyright 1999-2018 Gentoo Authors |
18 |
+# Copyright 1999-2021 Gentoo Authors |
19 |
# Distributed under the terms of the GNU General Public License v2 |
20 |
|
21 |
# @ECLASS: udev.eclass |
22 |
# @MAINTAINER: |
23 |
# udev-bugs@g.o |
24 |
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 |
25 |
+# @SUPPORTED_EAPIS: 5 6 7 8 |
26 |
# @BLURB: Default eclass for determining udev directories. |
27 |
# @DESCRIPTION: |
28 |
# Default eclass for determining udev directories. |
29 |
@@ -28,18 +28,17 @@ |
30 |
# } |
31 |
# @CODE |
32 |
|
33 |
+case ${EAPI} in |
34 |
+ 5|6|7|8) ;; |
35 |
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
36 |
+esac |
37 |
+ |
38 |
if [[ -z ${_UDEV_ECLASS} ]]; then |
39 |
_UDEV_ECLASS=1 |
40 |
|
41 |
inherit toolchain-funcs |
42 |
|
43 |
-case ${EAPI:-0} in |
44 |
- 0|1|2|3|4|5|6|7) ;; |
45 |
- *) die "${ECLASS}.eclass API in EAPI ${EAPI} not yet established." |
46 |
-esac |
47 |
- |
48 |
-if [[ ${EAPI:-0} == [0123456] ]]; then |
49 |
- RDEPEND="" |
50 |
+if [[ ${EAPI} == [56] ]]; then |
51 |
DEPEND="virtual/pkgconfig" |
52 |
else |
53 |
BDEPEND="virtual/pkgconfig" |
54 |
@@ -82,8 +81,7 @@ get_udevdir() { |
55 |
# @FUNCTION: udev_dorules |
56 |
# @USAGE: <rule> [...] |
57 |
# @DESCRIPTION: |
58 |
-# Install udev rule(s). Uses doins, thus it is fatal in EAPI 4 |
59 |
-# and non-fatal in earlier EAPIs. |
60 |
+# Install udev rule(s). Uses doins, thus it is fatal. |
61 |
udev_dorules() { |
62 |
debug-print-function ${FUNCNAME} "${@}" |
63 |
|
64 |
@@ -97,8 +95,7 @@ udev_dorules() { |
65 |
# @FUNCTION: udev_newrules |
66 |
# @USAGE: <oldname> <newname> |
67 |
# @DESCRIPTION: |
68 |
-# Install udev rule with a new name. Uses newins, thus it is fatal |
69 |
-# in EAPI 4 and non-fatal in earlier EAPIs. |
70 |
+# Install udev rule with a new name. Uses newins, thus it is fatal. |
71 |
udev_newrules() { |
72 |
debug-print-function ${FUNCNAME} "${@}" |
73 |
|
74 |
@@ -113,7 +110,7 @@ udev_newrules() { |
75 |
# @DESCRIPTION: |
76 |
# Run udevadm control --reload to refresh rules and databases |
77 |
udev_reload() { |
78 |
- if [[ ${ROOT} != "" ]] && [[ ${ROOT} != "/" ]]; then |
79 |
+ if [[ -n ${ROOT%/} ]]; then |
80 |
return 0 |
81 |
fi |
82 |
|
83 |
-- |
84 |
2.31.1 |