eudev: split eudev-hwdb from eudev
PATCH 1/1 eudev: split eudev-hwdb from eudev
The eudev recipe included the hwdb.d directory by default, which ended up making the eudev package a lot heavier than the old udev, this patch splits the eudev-hwdb package to avoid using unecessary space when required
--- meta/recipes-core/udev/eudev_3.1.5.bb | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-)
meta/recipes-core/udev/eudev_3.1.5.bb +23 -3
@@ -23,7 +23,7 @@ UPSTREAM_CHECK_URI = "https://github.com/gentoo/eudev/releases" SRC_URI[md5sum] = "e130f892d8744e292cb855db79935f68" SRC_URI[sha256sum] = "ce9d5fa91e3a42c7eb95512ca0fa2a631e89833053066bb6cdf42046b2a88553" -inherit autotools update-rc.d +inherit autotools update-rc.d qemu EXTRA_OECONF = " \ --sbindir=${base_sbindir} \
@@ -69,6 +69,8 @@ INITSCRIPT_PARAMS_udev-cache = "start 36 S ." PACKAGES =+ "libudev" PACKAGES =+ "udev-cache" +PACKAGES =+ "eudev-hwdb" + FILES_${PN} += "${libexecdir} ${nonarch_base_libdir}/udev ${bindir}/udevadm" FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
@@ -77,12 +79,30 @@ FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \ ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc" FILES_libudev = "${base_libdir}/libudev.so.*" FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache" +FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d" + +RDEPENDS_eudev-hwdb += "eudev" + +RRECOMMENDS_${PN} += "udev-cache eudev-hwdb" + +RPROVIDES_${PN} = "hotplug udev" python () { if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES") } -RRECOMMENDS_${PN} += "udev-cache" +pkg_postinst_eudev-hwdb () { + if test -n "$D"; then + ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \ + --root $D + chown root:root $D${sysconfdir}/udev/hwdb.bin + else + udevadm hwdb --update + fi +} + +pkg_prerm_eudev-hwdb () { + rm -f $D${sysconfdir}/udev/hwdb.bin +} -RPROVIDES_${PN} = "hotplug udev"
Signature · 1 line
2.6.2
Review
Quoted 4 lines · Alejandro Hernandez
(quoted diff) +2
-1+ ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \ + --root $D
udevadm is at ${bindir} with eudev, which means this script delays until first boot. I've fixed locally, and will file a bug about how hard it is to tell when a postinst is delayed due to errors...
Ross
Quoted 11 lines · Ross
On 14 March 2016 at 23:09, Alejandro Hernandez <[email protected] <mailto:[email protected]>> wrote:
+ ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb
--update \
+ --root $Dudevadm is at ${bindir} with eudev, which means this script delays until first boot. I've fixed locally, and will file a bug about how hard it is to tell when a postinst is delayed due to errors...
Ross
Thanks Ross
Alejandro