public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH 3/3] multiarch: Fix SRC_URI:remove ignoring
Date: Fri, 16 Feb 2024 09:55:52 +0200	[thread overview]
Message-ID: <20240216075552.3468218-4-amikan@ilbers.de> (raw)
In-Reply-To: <20240216075552.3468218-1-amikan@ilbers.de>

Setting SRC_URI right after getVar with expand=False results in loosing
SRC_URI:remove values. Rebuild logic to use remove-append approach.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 meta/classes/multiarch.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass
index 48cec9ab..0feb2f76 100644
--- a/meta/classes/multiarch.bbclass
+++ b/meta/classes/multiarch.bbclass
@@ -49,8 +49,9 @@ python multiarch_virtclass_handler() {
         vars = 'SRC_URI FILESPATH'.split()
         for var in vars:
             v = d.getVar(var, expand=False)
-            if v is not None:
-                d.setVar(var, v.replace('${PN}', '${BPN}'))
+            if v is not None and '${PN}' in v:
+                d.setVar(var + ':remove', v)
+                d.appendVar(var, ' ' + v.replace('${PN}', '${BPN}'))
 
     # When building compat/native, the corresponding suffix needs to be
     # propagated to all bitbake dependency definitions.
-- 
2.34.1


      parent reply	other threads:[~2024-02-16  7:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-16  7:55 [PATCH 0/3] " Anton Mikanovich
2024-02-16  7:55 ` [PATCH 1/3] meta-isar: Add examples of SRC_URI overrides usage Anton Mikanovich
2024-02-16  7:55 ` [PATCH 2/3] dpkg-base: Fix SRC_URI:remove ignoring Anton Mikanovich
2024-02-16  7:55 ` Anton Mikanovich [this message]

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=20240216075552.3468218-4-amikan@ilbers.de \
    --to=amikan@ilbers.de \
    --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