commit: 92bbf05569214a014f2573891fe489183487467a
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 20 16:19:41 2021 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Jun 20 17:18:47 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92bbf055
sys-apps/hwids: call systemd-hwdb when USE=systemd is enabled
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../hwids/{hwids-20210613.ebuild => hwids-20210613-r1.ebuild} | 8 ++++++--
sys-apps/hwids/hwids-99999999.ebuild | 10 +++++++---
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/sys-apps/hwids/hwids-20210613.ebuild
b/sys-apps/hwids/hwids-20210613-r1.ebuild
similarity index 89%
rename from sys-apps/hwids/hwids-20210613.ebuild
rename to sys-apps/hwids/hwids-20210613-r1.ebuild
index 6f60de83bdb..2f0cac8f8f5 100644
--- a/sys-apps/hwids/hwids-20210613.ebuild
+++ b/sys-apps/hwids/hwids-20210613-r1.ebuild
@@ -18,9 +18,11 @@ fi
LICENSE="|| ( GPL-2 BSD ) public-domain"
SLOT="0"
-IUSE="+net +pci +udev +usb"
+IUSE="+net +pci systemd +udev +usb"
+REQUIRED_USE="systemd? ( udev )"
RDEPEND="
+ systemd? ( sys-apps/systemd[hwdb] )
udev? ( virtual/udev )
"
@@ -83,7 +85,9 @@ src_install() {
}
pkg_postinst() {
- if use udev; then
+ if use systemd; then
+ systemd-hwdb --root="${ROOT}" update
+ elif use udev; then
udevadm hwdb --update --root="${ROOT}"
fi
}
diff --git a/sys-apps/hwids/hwids-99999999.ebuild
b/sys-apps/hwids/hwids-99999999.ebuild
index fdc4a456ddd..2f0cac8f8f5 100644
--- a/sys-apps/hwids/hwids-99999999.ebuild
+++ b/sys-apps/hwids/hwids-99999999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2012-2020 Gentoo Authors
+# Copyright 2012-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -18,9 +18,11 @@ fi
LICENSE="|| ( GPL-2 BSD ) public-domain"
SLOT="0"
-IUSE="+net +pci +udev +usb"
+IUSE="+net +pci systemd +udev +usb"
+REQUIRED_USE="systemd? ( udev )"
RDEPEND="
+ systemd? ( sys-apps/systemd[hwdb] )
udev? ( virtual/udev )
"
@@ -83,7 +85,9 @@ src_install() {
}
pkg_postinst() {
- if use udev; then
+ if use systemd; then
+ systemd-hwdb --root="${ROOT}" update
+ elif use udev; then
udevadm hwdb --update --root="${ROOT}"
fi
}