All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] eudev: split eudev-hwdb from eudev
@ 2016-03-14 23:09 Alejandro Hernandez
  2016-03-15 13:32 ` Burton, Ross
  0 siblings, 1 reply; 3+ messages in thread
From: Alejandro Hernandez @ 2016-03-14 23:09 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
---
 meta/recipes-core/udev/eudev_3.1.5.bb | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/udev/eudev_3.1.5.bb b/meta/recipes-core/udev/eudev_3.1.5.bb
index e94e0dc..b77744d 100644
--- a/meta/recipes-core/udev/eudev_3.1.5.bb
+++ b/meta/recipes-core/udev/eudev_3.1.5.bb
@@ -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"
-- 
2.6.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] eudev: split eudev-hwdb from eudev
  2016-03-14 23:09 [PATCH] eudev: split eudev-hwdb from eudev Alejandro Hernandez
@ 2016-03-15 13:32 ` Burton, Ross
  2016-03-15 14:43   ` Alejandro Hernandez
  0 siblings, 1 reply; 3+ messages in thread
From: Burton, Ross @ 2016-03-15 13:32 UTC (permalink / raw)
  To: Alejandro Hernandez; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

On 14 March 2016 at 23:09, Alejandro Hernandez <
alejandro.hernandez@linux.intel.com> wrote:

> +        ${@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

[-- Attachment #2: Type: text/html, Size: 896 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] eudev: split eudev-hwdb from eudev
  2016-03-15 13:32 ` Burton, Ross
@ 2016-03-15 14:43   ` Alejandro Hernandez
  0 siblings, 0 replies; 3+ messages in thread
From: Alejandro Hernandez @ 2016-03-15 14:43 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 575 bytes --]

On 03/15/2016 07:32 AM, Burton, Ross wrote:
>
> On 14 March 2016 at 23:09, Alejandro Hernandez 
> <alejandro.hernandez@linux.intel.com 
> <mailto:alejandro.hernandez@linux.intel.com>> wrote:
>
>     +   ${@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

Thanks Ross

Alejandro


[-- Attachment #2: Type: text/html, Size: 1642 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-15 14:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-14 23:09 [PATCH] eudev: split eudev-hwdb from eudev Alejandro Hernandez
2016-03-15 13:32 ` Burton, Ross
2016-03-15 14:43   ` Alejandro Hernandez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.