Skip to contentSkip to conversation

udev-extraconf: Split automount and autonet into seperate packages

PATCH Superseded Vivek Puar 2 participants 5 messages Nov 22, 2025 – Nov 24, 2025

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Vivek Puar

author
#0 lore raw

PATCH v2 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. This allows selective installation, and reduces unnecessary dependencies for systems that only need one feature.

---
 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 5 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. This allows selective installation, and reduces unnecessary dependencies for systems that only need one feature.

The same reasoning applies to any other recipe: we could micro-split everything. It would help to go into a bit more details on this: what do these features do, and why one would want one but not the other, and what are the actual savings achieved.

Alex

author
#2 lore raw
Quoted 7 lines · Alexander Kanavin

The same reasoning applies to any other recipe: we could micro-split everything. It would help to go into a bit more details on this: what do these features do, and why one would want one but not the other, and what are the actual savings achieved.

Alex

If one needs only storage devices to be auto-mounted and does not require network hotplug handling, splitting allows selecting just the automount package without having to care about other rules. This also avoids installing unnecessary scripts and rules.

Regards,
Vivek

#3 lore raw
Quoted 4 lines · Vivek Puar via lists.openembedded.org

If one needs only storage devices to be auto-mounted and does not require network hotplug handling, splitting allows selecting just the automount package without having to care about other rules. This also avoids installing unnecessary scripts and rules.

This leaves the last question: what are the actual savings achieved? How much disk space is saved? Does this avoid pulling in other dependencies? The patch doesn't adjust runtime dependencies (e.g. util-linux items), so the savings must be very minimal. Is it only about avoiding files which are not needed?

There's a trade-off between not having unnecessary files and increased complexity of packaging, which carries a maintenance burden. This patch is probably okay, as it's for a self-contained, rarely changed recipe that only installs local files, it just needs to be justified a bit better.

Alex

author
#4 lore raw
Quoted 7 lines · Alexander Kanavin

This leaves the last question: what are the actual savings achieved? How much disk space is saved? Does this avoid pulling in other dependencies? The patch doesn't adjust runtime dependencies (e.g. util-linux items), so the savings must be very minimal. Is it only about avoiding files which are not needed?

Quoted 7 lines

There's a trade-off between not having unnecessary files and increased complexity of packaging, which carries a maintenance burden. This patch is probably okay, as it's for a self-contained, rarely changed recipe that only installs local files, it just needs to be justified a bit better.

Alex

This does not save much space but just avoids installation of rules that are unrelated. Will send a v3 with updated commit message.

Regards,
Vivek