| Message ID | 20251125090722.2240655-1-vpuar@qti.qualcomm.com |
|---|---|
| State | New |
| Headers | show |
| Series | [v4] udev-extraconf: Split automount and autonet into seperate packages | expand |
On Tue, 25 Nov 2025 at 10:07, Vivek Puar via lists.openembedded.org <vpuar=qti.qualcomm.com@lists.openembedded.org> wrote: > > Created two subpackages (${PN}-automount and ${PN}-autonet) to separate > udev rules and scripts for automount and autonet functionality. > > If the image only needs storage devices to be auto-mounted or just needs > network hotplug handling, splitting the packages let us choose automount or > autonet package without having to care about other rules. This change does not > save much space but helps avoid installing unnecessary scripts and rules. This still needs an answer to the question asked previously: how was this patch tested? Given that previous iterations of the patch made serious runtime dependency omissions, I'm somewhat nervous that the patch hasn't been actually verified on the target. Alex
On Tue, Nov 25, 2025 at 04:01 PM, Alexander Kanavin wrote: > > This still needs an answer to the question asked previously: how was > this patch tested? Given that previous iterations of the patch made > serious runtime dependency omissions, I'm somewhat nervous that the > patch hasn't been actually verified on the target. > > Alex With this latest change, I've verified on the target that it meets all the dependencies when we install packages individually and also verified that all the dependencies are met when udev-extraconf is added to the image. So I've covered all the possibilities and verified on the target. Vivek
diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb index 2ba6606c05..1353d35de2 100644 --- a/meta/recipes-core/udev/udev-extraconf_1.1.bb +++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb @@ -40,22 +40,39 @@ do_install() { install -m 0755 ${S}/network.sh ${D}${sysconfdir}/udev/scripts } -pkg_postinst:${PN} () { +PACKAGES =+ "${PN}-automount ${PN}-autonet" + +FILES:${PN}-automount = " \ + ${sysconfdir}/udev/rules.d/automount.rules \ + ${sysconfdir}/udev/scripts/mount.sh \ + ${sysconfdir}/udev/mount.ignorelist \ +" + +RDEPENDS:${PN}-automount = "udev util-linux-blkid ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'util-linux-lsblk', '', d)}" +CONFFILES:${PN}-automount = "${sysconfdir}/udev/mount.ignorelist" + +pkg_postinst:${PN}-automount () { if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then sed -i "/\[Service\]/aMountFlags=shared" $D${systemd_unitdir}/system/systemd-udevd.service fi } -pkg_postrm:${PN} () { +pkg_postrm:${PN}-automount () { if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then sed -i "/MountFlags=shared/d" $D${systemd_unitdir}/system/systemd-udevd.service fi } -RDEPENDS:${PN} = "udev util-linux-blkid ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'util-linux-lsblk', '', d)}" -CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist" +FILES:${PN}-autonet = " \ + ${sysconfdir}/udev/rules.d/autonet.rules \ + ${sysconfdir}/udev/scripts/network.sh \ +" + +RDEPENDS:${PN}-autonet = "udev" # to replace udev-extra-rules from meta-oe RPROVIDES:${PN} = "udev-extra-rules" RREPLACES:${PN} = "udev-extra-rules" RCONFLICTS:${PN} = "udev-extra-rules" + +RDEPENDS:${PN} = "${PN}-automount ${PN}-autonet"
Created two subpackages (${PN}-automount and ${PN}-autonet) to separate udev rules and scripts for automount and autonet functionality. If the image only needs storage devices to be auto-mounted or just needs network hotplug handling, splitting the packages let us choose automount or autonet package without having to care about other rules. This change does not save much space but helps avoid installing unnecessary scripts and rules. Signed-off-by: Vivek Puar <vpuar@qti.qualcomm.com> --- meta/recipes-core/udev/udev-extraconf_1.1.bb | 25 ++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-)