* [PATCH 0/3] Fix SRC_URI:remove ignoring
@ 2024-02-16 7:55 Anton Mikanovich
2024-02-16 7:55 ` [PATCH 1/3] meta-isar: Add examples of SRC_URI overrides usage Anton Mikanovich
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Anton Mikanovich @ 2024-02-16 7:55 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
SRC_URI:remove override now got lost due to manual SRC_URI manipulations.
Add example for CI and few fixes to make this test case become passed.
Anton Mikanovich (3):
meta-isar: Add examples of SRC_URI overrides usage
dpkg-base: Fix SRC_URI:remove ignoring
multiarch: Fix SRC_URI:remove ignoring
meta-isar/recipes-app/hello-isar/hello-isar.bb | 12 +++++++++++-
meta/classes/dpkg-base.bbclass | 5 +----
meta/classes/multiarch.bbclass | 5 +++--
3 files changed, 15 insertions(+), 7 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] meta-isar: Add examples of SRC_URI overrides usage
2024-02-16 7:55 [PATCH 0/3] Fix SRC_URI:remove ignoring Anton Mikanovich
@ 2024-02-16 7:55 ` Anton Mikanovich
2024-02-16 7:55 ` [PATCH 2/3] dpkg-base: Fix SRC_URI:remove ignoring Anton Mikanovich
2024-02-16 7:55 ` [PATCH 3/3] multiarch: " Anton Mikanovich
2 siblings, 0 replies; 4+ messages in thread
From: Anton Mikanovich @ 2024-02-16 7:55 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
To check SRC_URI variable manipulations add some append and remove
override examples.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta-isar/recipes-app/hello-isar/hello-isar.bb | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/meta-isar/recipes-app/hello-isar/hello-isar.bb b/meta-isar/recipes-app/hello-isar/hello-isar.bb
index 6304b6b4..b6ae5d0e 100644
--- a/meta-isar/recipes-app/hello-isar/hello-isar.bb
+++ b/meta-isar/recipes-app/hello-isar/hello-isar.bb
@@ -17,7 +17,17 @@ DEPENDS += "libhello"
SRC_URI = " \
git://github.com/ilbers/hello.git;protocol=https;branch=master;destsuffix=${P} \
file://subdir/0001-Add-some-help.patch \
- file://yet-another-change.txt;apply=yes;striplevel=0"
+ file://yet-another-change.txt;apply=yes;striplevel=0 \
+ file://nonexist-file \
+"
+
+# Examples for SRC_URI parser testing
+SRC_URI:append = " \
+ git://nonexist-git \
+"
+SRC_URI:remove = "file://nonexist-file"
+SRC_URI:remove = "git://nonexist-git"
+
SRCREV = "b48d15629667377f544e71c7310b80a71d00d9dd"
inherit dpkg
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/3] dpkg-base: Fix SRC_URI:remove ignoring
2024-02-16 7:55 [PATCH 0/3] Fix SRC_URI:remove ignoring 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 ` Anton Mikanovich
2024-02-16 7:55 ` [PATCH 3/3] multiarch: " Anton Mikanovich
2 siblings, 0 replies; 4+ messages in thread
From: Anton Mikanovich @ 2024-02-16 7:55 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
Current SRC_APT filling code results in loosing SRC_URI:remove values.
Remove setting SRC_URI value in prior to remove apt:// items with
additional variables.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta/classes/dpkg-base.bbclass | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index a8263046..5f88c805 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -87,15 +87,12 @@ python() {
src_uri = (d.getVar('SRC_URI', False) or "").split()
prefix = "apt://"
- new_src_uri = []
src_apt = []
for u in src_uri:
if u.startswith(prefix):
src_apt.append(u[len(prefix) :])
- else:
- new_src_uri.append(u)
+ d.setVar('SRC_URI:remove', u)
- d.setVar('SRC_URI', ' '.join(new_src_uri))
d.prependVar('SRC_APT', ' '.join(src_apt))
if len(d.getVar('SRC_APT').strip()) > 0:
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/3] multiarch: Fix SRC_URI:remove ignoring
2024-02-16 7:55 [PATCH 0/3] Fix SRC_URI:remove ignoring 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
2 siblings, 0 replies; 4+ messages in thread
From: Anton Mikanovich @ 2024-02-16 7:55 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-16 7:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-16 7:55 [PATCH 0/3] Fix SRC_URI:remove ignoring 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 ` [PATCH 3/3] multiarch: " Anton Mikanovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox