Re: [yocto] Modifying SRC_URI before it is parsed by the fetcher
EXT-Antti Gärding <[email protected]> Mon, 18 May 2026 05:00:00 +0000
| Newsgroups | org.yoctoproject.lists.yocto |
|---|---|
| Message-ID | <AS8PR08MB72516677F87CEF721A3C556FD5062@AS8PR08MB7251.eurprd08.prod.outlook.com> |
--_000_AS8PR08MB72516677F87CEF721A3C556FD5062AS8PR08MB7251eurp_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I tried Quentin's suggestion without the part concerning PLEASE_ADD_TAG. It=
worked and it didn't give an error when I removed "inherit src-uri-tag" ev=
en though the reference to SRC_URI_TAG was still there in SRC_URI. In that =
sense, it solved the problem, but it is a little different kind of solution=
than what I was looking for, so I have to discuss with my team before I pr=
oceed with it.
> But the *only* thing you want to do is modifying SRC_URI but not
actually modify it, I don't understand why this is an absolute
impossibility and why you must find hacks within BitBake instead. This
all sounds like a horrific XY problem.
Now that you said it, I guess I have to admit that there is some sense of X=
Y problem here.
On the other hand, I think there is a difference between modifying SRC_URI =
in the recipe and having it modified by a class during the build process wi=
thout changing the recipe. I also think that there can be a reason to want =
one and not the other.
I already had a solution that works well enough, but I wanted to see if the=
re are other options because log prints from extra invocations of an anonym=
ous Python function look weird.
I also got curious about the event handler approach. I hadn't noticed it be=
fore this and there doesn't seem to be information about available on the i=
nternet.
What are you referring to as a hack? Are some of these approaches that have=
been mentioned in this tread not recommended for some reason?
BR,
Antti G=E4rding
--_000_AS8PR08MB72516677F87CEF721A3C556FD5062AS8PR08MB7251eurp_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
I tried Quentin's suggestion without the part concerning PLEASE_ADD_TAG. It=
worked and it didn't give an error when I removed "inherit src-uri-ta=
g" even though the reference to SRC_URI_TAG was still there in SRC_URI=
. In that sense, it solved the problem, but
it is a little different kind of solution than what I was looking for, so =
I have to discuss with my team before I proceed with it.</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
> <a name=3D"x_x_x_x__MailOriginal"></a>But the *only* thing you want to=
do is modifying SRC_URI but not<br>
actually modify it, I don't understand why this is an absolute<br>
impossibility and why you must find hacks within BitBake instead. This<br>
all sounds like a horrific XY problem.</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
Now that you said it, I guess I have to admit that there is some sense of X=
Y problem here.</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
On the other hand, I think there is a difference between modifying SRC_URI =
in the recipe and having it modified by a class during the build process wi=
thout changing the recipe. I also think that there can be a reason to want =
one and not the other.</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
I already had a solution that works well enough, but I wanted to see if the=
re are other options because log prints from extra invocations of an anonym=
ous Python function look weird.</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
I also got curious about the event handler approach. I hadn't noticed it be=
fore this and there doesn't seem to be information about available on the i=
nternet.</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
What are you referring to as a hack? Are some of these approaches that have=
been mentioned in this tread not recommended for some reason?</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
BR,</div>
<div style=3D"direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos=
_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb=
(0, 0, 0);" class=3D"elementToProof">
Antti G=E4rding</div>
</body>
</html>
--_000_AS8PR08MB72516677F87CEF721A3C556FD5062AS8PR08MB7251eurp_--