This looks as if it could make use of the postinst-intercept mechanism. As, it forces to modify/bbappend each recipe (eudev, systemd) if one wants to change things (eg. when target is not fully supported by qemu).
Yann, If you can, a patch sent to the oe-core list would be nice. If you aren't able to do that Qi will work on it next week or at least before 2.6-M4 as per Richard's request. Let us know what the plan is please. ../Randy
(In reply to comment #1) > Yann, > If you can, a patch sent to the oe-core list would be nice. > > If you aren't able to do that Qi will work on it next week or at least > before 2.6-M4 as per Richard's request. > > Let us know what the plan is please. > > ../Randy I'll check it late this week or early next week.
I just take a quick look, I think things are OK ATM. """ PACKAGE_WRITE_DEPS += "qemu-native" pkg_postinst_eudev-hwdb () { if test -n "$D"; then if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true','false', d)}; then ${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D chown root:root $D${sysconfdir}/udev/hwdb.bin else $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX} fi else udevadm hwdb --update fi } """ What's the actual problem?
The yocto project provides the postinst-intercept framework to allow working around the readonly constraint. Without knowing the rationale for this framework, the main advantage I see is that it puts all such mechanism in one place, and as many recipes can use it without code duplication. Combined with the ability to override the scripts with POSTINST_INTERCEPTS_DIR, it allows overriding an intercept rule only once to benefit many packages (here udev and systemd). As I understand it, that would basically be moving the "then" part of the postinst into a new intercept scriptlet.
(In reply to comment #4) > The yocto project provides the postinst-intercept framework to allow working > around > the readonly constraint. Without knowing the rationale for this framework, > the > main advantage I see is that it puts all such mechanism in one place, and as > many > recipes can use it without code duplication. Combined with the ability to > override > the scripts with POSTINST_INTERCEPTS_DIR, it allows overriding an intercept > rule only > once to benefit many packages (here udev and systemd). > > As I understand it, that would basically be moving the "then" part of the > postinst > into a new intercept scriptlet. Please just send out a patch. I don't understand what you are talking about.
I personally don't think the current handling has problem. Please double check it.
I'll send a patch
It appears that Yann has accepted this, moving out of NEEDINFO.
Yann, any update? Will you be able to work on this soon?
The current systed postinst is: pkg_postinst_udev-hwdb () { if test -n "$D"; then $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} else udevadm hwdb --update fi } And eudev: PACKAGE_WRITE_DEPS += "qemu-native" pkg_postinst_eudev-hwdb () { if test -n "$D"; then $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} else udevadm hwdb --update fi } Fixed in oe-core d6b737a31a8842cdc770b05e28503c81a691d10d.