Skip to contentSkip to conversation

udev-extraconf: Split automount and autonet into seperate packages

PATCH Superseded Vivek Puar 2 participants 3 messages Nov 24, 2025 – Nov 25, 2025

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Vivek Puar

author
#0 lore raw

PATCH v3 1/1 udev-extraconf: Split automount and autonet into seperate packages

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.

---
 meta/recipes-core/udev/udev-extraconf_1.1.bb | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
meta/recipes-core/udev/udev-extraconf_1.1.bb +15 -0
index 2ba6606c05..8314258870 100644
@@ -59,3 +59,18 @@ CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist"
 RPROVIDES:${PN} = "udev-extra-rules"
 RREPLACES:${PN} = "udev-extra-rules"
 RCONFLICTS:${PN} = "udev-extra-rules"
+
+PACKAGES =+ "${PN}-automount ${PN}-autonet"
+
+FILES:${PN}-automount = " \
+    ${sysconfdir}/udev/rules.d/automount.rules \
+    ${sysconfdir}/udev/scripts/mount.sh \
+    ${sysconfdir}/udev/mount.ignorelist \
+"
+
+FILES:${PN}-autonet = " \
+    ${sysconfdir}/udev/rules.d/autonet.rules \
+    ${sysconfdir}/udev/scripts/network.sh \
+"
+
+RDEPENDS:${PN} = "${PN}-automount ${PN}-autonet"
Signature · 1 line
2.34.1
#1 lore raw
Quoted 7 lines · Vivek Puar via lists.openembedded.org

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.

I'm still not convinced 'not installing unnecessary files' when amount of file is small and the files are tiny is a sufficient reason, and this sets a precedent for any recipe being subject to such micro-splitting, but maybe others in the patch review will disagree.

What I wanted to point out is this line that isn't changed by the patch:

RDEPENDS:${PN} = "udev util-linux-blkid ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'util-linux-lsblk', '', d)}"

which prompts a couple questions:

1. How was this tested? If you install only the new packages, these dependencies will not be fulfilled.

2. Can you review what and where needs those things and adjust RDEPENDS accordingly?

Alex

author
#2 lore raw
Quoted 12 lines · Alexander Kanavin

I'm still not convinced 'not installing unnecessary files' when amount of file is small and the files are tiny is a sufficient reason, and this sets a precedent for any recipe being subject to such micro-splitting, but maybe others in the patch review will disagree.

What I wanted to point out is this line that isn't changed by the patch:

RDEPENDS:${PN} = "udev util-linux-blkid ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'util-linux-lsblk', '', d)}"

Quoted 7 lines

which prompts a couple questions:

1. How was this tested? If you install only the new packages, these dependencies will not be fulfilled.

2. Can you review what and where needs those things and adjust RDEPENDS accordingly?

Sure, will update the RDEPENDS, make necessary changes and share v4.

Quoted 2 lines

Alex

Regards,
Vivek