public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH] linux-custom: Allow for config fragments in subdirs
Date: Wed, 18 Oct 2023 15:47:29 +0200	[thread overview]
Message-ID: <56795cac-eab1-4bba-93c2-2dd404a59638@siemens.com> (raw)

From: Jan Kiszka <jan.kiszka@siemens.com>

Might be useful in same cases, and while fetching and processing already
worked, copying didn't take subdirs into account.

Adjust the linux-mainline recipe to have a test case for this.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../linux/files/{ => subdir}/no-ubifs-fs.cfg             | 0
 meta-isar/recipes-kernel/linux/linux-mainline_5.4.203.bb | 2 +-
 meta/recipes-kernel/linux/linux-custom.inc               | 9 +++++----
 3 files changed, 6 insertions(+), 5 deletions(-)
 rename meta-isar/recipes-kernel/linux/files/{ => subdir}/no-ubifs-fs.cfg (100%)

diff --git a/meta-isar/recipes-kernel/linux/files/no-ubifs-fs.cfg b/meta-isar/recipes-kernel/linux/files/subdir/no-ubifs-fs.cfg
similarity index 100%
rename from meta-isar/recipes-kernel/linux/files/no-ubifs-fs.cfg
rename to meta-isar/recipes-kernel/linux/files/subdir/no-ubifs-fs.cfg
diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_5.4.203.bb b/meta-isar/recipes-kernel/linux/linux-mainline_5.4.203.bb
index 7f1bac12..47270cbb 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_5.4.203.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_5.4.203.bb
@@ -13,7 +13,7 @@ SRC_URI += " \
     https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-${ARCHIVE_VERSION}.tar.xz \
     file://x86_64_defconfig \
     file://ftpm-module.cfg \
-    file://no-ubifs-fs.cfg \
+    file://subdir/no-ubifs-fs.cfg \
     file://no-root-nfs.cfg;apply=no"
 
 SRC_URI[sha256sum] = "fc933f5b13066cfa54aacb5e86747a167bad1d8d23972e4a03ab5ee36c29798a"
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 09fb5c85..876397c3 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -210,10 +210,11 @@ EOF
 	# copy config fragments over to the kernel tree
 	src_frags="${@ " ".join(config_fragments(d)) }"
 	rm -rf ${S}/debian/fragments
-	if [ -n "${src_frags}" ]; then
-		mkdir -p ${S}/debian/fragments
-		(cd ${WORKDIR} && cp ${src_frags} ${S}/debian/fragments/)
-	fi
+	for frag in ${src_frags}; do
+		basedir=$(dirname ${frag})
+		mkdir -p ${S}/debian/fragments/${basedir}
+		cp ${WORKDIR}/${frag} ${S}/debian/fragments/${basedir}/
+	done
 }
 
 do_dpkg_source:prepend() {
-- 
2.35.3

             reply	other threads:[~2023-10-18 13:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18 13:47 Jan Kiszka [this message]
2023-10-25  6:42 ` Uladzimir Bely

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=56795cac-eab1-4bba-93c2-2dd404a59638@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=isar-users@googlegroups.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