summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2021-06-20 12:19:41 -0400
committerMike Gilbert <floppym@gentoo.org>2021-06-20 13:18:47 -0400
commit92bbf05569214a014f2573891fe489183487467a (patch)
tree9891e5cd36c82c969ae4c6f902cd5ff79a71fc2e
parentsys-apps/systemd: remove code to save/restore enabled units (diff)
downloadgentoo-92bbf05569214a014f2573891fe489183487467a.tar.gz
gentoo-92bbf05569214a014f2573891fe489183487467a.tar.bz2
gentoo-92bbf05569214a014f2573891fe489183487467a.zip
sys-apps/hwids: call systemd-hwdb when USE=systemd is enabled
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
-rw-r--r--sys-apps/hwids/hwids-20210613-r1.ebuild (renamed from sys-apps/hwids/hwids-20210613.ebuild)8
-rw-r--r--sys-apps/hwids/hwids-99999999.ebuild10
2 files changed, 13 insertions, 5 deletions
diff --git a/sys-apps/hwids/hwids-20210613.ebuild b/sys-apps/hwids/hwids-20210613-r1.ebuild
index 6f60de83bdb6..2f0cac8f8f52 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 fdc4a456ddd5..2f0cac8f8f52 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
}