diff mbox series

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

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

Commit Message

Vivek Puar Nov. 24, 2025, 8 a.m. UTC
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 | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Alexander Kanavin Nov. 24, 2025, 10:42 a.m. UTC | #1
On Mon, 24 Nov 2025 at 09:00, 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.

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
Vivek Puar Nov. 25, 2025, 9:01 a.m. UTC | #2
On Mon, Nov 24, 2025 at 04:12 PM, Alexander Kanavin wrote:

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

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

> 
> Alex

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"