From: "'Jan Kiszka' via isar-users" <isar-users@googlegroups.com>
To: isar-users <isar-users@googlegroups.com>
Cc: Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH v2 1/4] rootfs: Implement update-initramfs stubs via symlink
Date: Tue, 16 Sep 2025 13:05:09 +0200 [thread overview]
Message-ID: <a1fd7da0326d407ad680458d81e62687b283c3fb.1758020712.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1758020712.git.jan.kiszka@siemens.com>
From: Jan Kiszka <jan.kiszka@siemens.com>
Avoid needless copying of any files. Consolidate the sudo calls into one
at this chance.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/classes/rootfs.bbclass | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index ebe3bf4a..956a6089 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -182,8 +182,12 @@ ROOTFS_CONFIGURE_COMMAND += "rootfs_disable_initrd_generation"
rootfs_disable_initrd_generation[weight] = "1"
rootfs_disable_initrd_generation() {
# fully disable initrd generation
- sudo mkdir -p "${ROOTFSDIR}${ROOTFS_STUBS_DIR}"
- sudo cp -a ${ROOTFSDIR}/usr/bin/true ${ROOTFSDIR}${ROOTFS_STUBS_DIR}/update-initramfs
+ sudo -s <<'EOSUDO'
+ set -e
+
+ mkdir -p "${ROOTFSDIR}${ROOTFS_STUBS_DIR}"
+ ln -s /usr/bin/true ${ROOTFSDIR}${ROOTFS_STUBS_DIR}/update-initramfs
+EOSUDO
}
ROOTFS_INSTALL_COMMAND += "rootfs_install_pkgs_update"
--
2.51.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/a1fd7da0326d407ad680458d81e62687b283c3fb.1758020712.git.jan.kiszka%40siemens.com.
next prev parent reply other threads:[~2025-09-16 11:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-16 11:05 [PATCH v2 0/4] Several micro-optimizations 'Jan Kiszka' via isar-users
2025-09-16 11:05 ` 'Jan Kiszka' via isar-users [this message]
2025-09-16 11:05 ` [PATCH v2 2/4] sbuild-chroot: Skip initramfs generation while installing build dependencies 'Jan Kiszka' via isar-users
2025-09-16 11:05 ` [PATCH v2 3/4] rootfs: Avoid unneeded commands inside chroot 'Jan Kiszka' via isar-users
2025-09-16 11:05 ` [PATCH v2 4/4] image-locales-extension: Optimize package removal 'Jan Kiszka' via isar-users
2025-10-13 14:02 ` [PATCH v2 0/4] Several micro-optimizations Zhihang Wei
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=a1fd7da0326d407ad680458d81e62687b283c3fb.1758020712.git.jan.kiszka@siemens.com \
--to=isar-users@googlegroups.com \
--cc=felix.moessbauer@siemens.com \
--cc=jan.kiszka@siemens.com \
/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