From: "'Jan Kiszka' via isar-users" <isar-users@googlegroups.com>
To: Amy Fong <amy.fong.3142@gmail.com>, isar-users@googlegroups.com
Cc: Amy Fong <amy.fong@siemens.com>
Subject: Re: [PATCH 1/2] base.bbclass: Enable the addition of epoch in an apt SRC_URI's version.
Date: Wed, 8 Jan 2025 21:57:25 +0100 [thread overview]
Message-ID: <9b103a8f-21ef-4da2-807c-00b4b5c05fcd@siemens.com> (raw)
In-Reply-To: <20250108155703.10376-1-amy.fong.3142@gmail.com>
On 08.01.25 16:57, Amy Fong wrote:
> From: Amy Fong <amy.fong@siemens.com>
>
> If the epoch is added in an apt's package version, there will be an
> exception thrown as base.bbclass tries to parse the entry as a URI
> (it complains about an invalid port). (man deb-version)
>
> e.g. SRC_URI = "apt://cryptsetup=2:2.6.1-4~deb12u2
>
> Fix: remove apt:// entries in URI validation list.
>
> Signed-off-by: Amy Fong <amy.fong@siemens.com>
> ---
> meta/classes/base.bbclass | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index b8825bd3..7d4ab49f 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -123,9 +123,10 @@ python() {
> needsrcrev = False
> srcuri = d.getVar('SRC_URI')
> for uri_string in srcuri.split():
> - uri = bb.fetch.URI(uri_string)
> - if uri.scheme in ("svn", "git", "gitsm", "hg", "p4", "repo"):
> - needsrcrev = True
> + if not uri_string.startswith("apt://"):
> + uri = bb.fetch.URI(uri_string)
> + if uri.scheme in ("svn", "git", "gitsm", "hg", "p4", "repo"):
> + needsrcrev = True
>
> if needsrcrev:
> d.setVar("SRCPV", "${@bb.fetch2.get_srcrev(d)}")
Looks good to me.
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
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/9b103a8f-21ef-4da2-807c-00b4b5c05fcd%40siemens.com.
next prev parent reply other threads:[~2025-01-08 20:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 15:57 Amy Fong
2025-01-08 15:57 ` [PATCH 2/2] error directory creation Amy Fong
2025-01-08 20:56 ` 'Jan Kiszka' via isar-users
2025-01-09 3:43 ` Amy Fong
2025-01-09 6:45 ` 'Jan Kiszka' via isar-users
2025-01-08 20:57 ` 'Jan Kiszka' via isar-users [this message]
2025-01-16 7:03 ` [PATCH 1/2] base.bbclass: Enable the addition of epoch in an apt SRC_URI's version 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=9b103a8f-21ef-4da2-807c-00b4b5c05fcd@siemens.com \
--to=isar-users@googlegroups.com \
--cc=amy.fong.3142@gmail.com \
--cc=amy.fong@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