From: Robin Lintermann <rl@karo-electronics.de>
To: openembedded-core@lists.openembedded.org
Cc: Robin Lintermann <rl@karo-electronics.de>
Subject: [scarthgap][PATCH 5/5] update-alternatives.bbclass: Add a 'DISTRO_FEATURE' to create only relative symlinks
Date: Tue, 2 Jun 2026 16:21:32 +0200 [thread overview]
Message-ID: <20260602142132.976138-5-rl@karo-electronics.de> (raw)
In-Reply-To: <20260602142132.976138-1-rl@karo-electronics.de>
Currently update-alternatives will create absolute symlinks to the
target files.
This leads to confusion when looking at the resulting rootfs directory
from the host machine and makes it impossible to do a diff between two
rootfs directories staged on the host.
Add a way to let it install relative symlinks only by adding
'alternatives-symlinks-relative' to DISTRO_FEATURES.
Signed-off-by: Robin Lintermann <rl@karo-electronics.de>
---
meta/classes-recipe/update-alternatives.bbclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/classes-recipe/update-alternatives.bbclass b/meta/classes-recipe/update-alternatives.bbclass
index b153e1b297..6cfb190c31 100644
--- a/meta/classes-recipe/update-alternatives.bbclass
+++ b/meta/classes-recipe/update-alternatives.bbclass
@@ -261,6 +261,8 @@ def update_alternatives_alt_targets(d, pkg):
continue
alt_target = os.path.normpath(alt_target)
+ if bb.utils.contains('DISTRO_FEATURES','alternatives-symlinks-relative',True,False,d):
+ alt_target = os.path.relpath(alt_target, os.path.dirname(alt_link))
updates.append( (alt_name, alt_link, alt_target, alt_priority) )
return updates
--
2.43.0
next prev parent reply other threads:[~2026-06-02 14:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 14:21 [scarthgap][PATCH 1/5] sign_ipk.bbclass: add missing 'd' parameter to raise_sanity_error() Robin Lintermann
2026-06-02 14:21 ` [scarthgap][PATCH 2/5] busybox: add a DEPENDS on libpam when pam is selected in DISTRO_FEATURES Robin Lintermann
2026-06-02 14:21 ` [scarthgap][PATCH 3/5] util-linux: fix 'mount' options in mountall initscript Robin Lintermann
2026-06-02 14:21 ` [scarthgap][PATCH 4/5] alsa-utils: add runtime dependency on ncurses for 'alsamixer' Robin Lintermann
2026-06-02 14:31 ` Patchtest results for " patchtest
2026-06-02 14:21 ` Robin Lintermann [this message]
2026-06-16 14:40 ` [OE-core] [scarthgap][PATCH 1/5] sign_ipk.bbclass: add missing 'd' parameter to raise_sanity_error() Yoann Congal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260602142132.976138-5-rl@karo-electronics.de \
--to=rl@karo-electronics.de \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox