diff mbox series

[v2] udev-extraconf: Split automount and autonet into seperate packages

Message ID 20251122160554.283274-1-vpuar@qti.qualcomm.com
State Accepted, archived
Commit 08662d71cd357c29c47dc42ead1d9106c584a1b8
Headers show
Series [v2] udev-extraconf: Split automount and autonet into seperate packages | expand

Commit Message

Vivek Puar Nov. 22, 2025, 4:05 p.m. UTC
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.

Signed-off-by: Vivek Puar <vpuar@qti.qualcomm.com>
---
 meta/recipes-core/udev/udev-extraconf_1.1.bb | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Alexander Kanavin Nov. 23, 2025, 4:06 p.m. UTC | #1
On Sat, 22 Nov 2025 at 17:06, 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. 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
Vivek Puar Nov. 24, 2025, 5:21 a.m. UTC | #2
On Sun, Nov 23, 2025 at 09:36 PM, Alexander Kanavin wrote:

> 
> 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
Alexander Kanavin Nov. 24, 2025, 6:38 a.m. UTC | #3
On Mon, 24 Nov 2025 at 06:21, Vivek Puar via lists.openembedded.org
<vpuar=qti.qualcomm.com@lists.openembedded.org> wrote:
> 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
Vivek Puar Nov. 24, 2025, 6:52 a.m. UTC | #4
On Mon, Nov 24, 2025 at 12:08 PM, Alexander Kanavin wrote:

> 
> 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

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
diff mbox series

Patch

diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb
index 2ba6606c05..8314258870 100644
--- a/meta/recipes-core/udev/udev-extraconf_1.1.bb
+++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb
@@ -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"