diff mbox series

[01/16] libmodulemd: put version in recipe filename

Message ID 20250605153508.961682-1-ross.burton@arm.com
State New
Headers show
Series [01/16] libmodulemd: put version in recipe filename | expand

Commit Message

Ross Burton June 5, 2025, 3:34 p.m. UTC
A recipe that fetches from git but is otherwise a released version
should not be using _git.bb recipe names.

Put the version in the filename, and drop the explicit PV, and set the
tag name in the SRC_URI to verify the SHA.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../libmodulemd/{libmodulemd_git.bb => libmodulemd_2.15.1.bb}  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
 rename meta/recipes-devtools/libmodulemd/{libmodulemd_git.bb => libmodulemd_2.15.1.bb} (95%)

Comments

Marko, Peter June 5, 2025, 3:52 p.m. UTC | #1
Adding tag to SRC_URI should be done only on recipe upgrade.
Reason is that build will fail if shallow tarball is generated before this change as it does not contain the tag.
If we want to add tags to all recipes which are missing it. bitbake needs to be adapted to add tag names to filename to distinguish old and new shallow tarballs.

Peter


> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Ross Burton via
> lists.openembedded.org
> Sent: Thursday, June 5, 2025 17:35
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 01/16] libmodulemd: put version in recipe filename
> 
> A recipe that fetches from git but is otherwise a released version
> should not be using _git.bb recipe names.
> 
> Put the version in the filename, and drop the explicit PV, and set the
> tag name in the SRC_URI to verify the SHA.
> 
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>  .../libmodulemd/{libmodulemd_git.bb => libmodulemd_2.15.1.bb}  | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>  rename meta/recipes-devtools/libmodulemd/{libmodulemd_git.bb =>
> libmodulemd_2.15.1.bb} (95%)
> 
> diff --git a/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb b/meta/recipes-
> devtools/libmodulemd/libmodulemd_2.15.1.bb
> similarity index 95%
> rename from meta/recipes-devtools/libmodulemd/libmodulemd_git.bb
> rename to meta/recipes-devtools/libmodulemd/libmodulemd_2.15.1.bb
> index 0c730329230..10aa6c543c3 100644
> --- a/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb
> +++ b/meta/recipes-devtools/libmodulemd/libmodulemd_2.15.1.bb
> @@ -4,9 +4,8 @@ DESCRIPTION = "${SUMMARY}"
>  LICENSE = "MIT"
>  LIC_FILES_CHKSUM =
> "file://COPYING;md5=25a3927bff3ee4f5b21bcb0ed3fcd6bb"
> 
> -SRC_URI = "git://github.com/fedora-
> modularity/libmodulemd;protocol=https;branch=main"
> +SRC_URI = "git://github.com/fedora-
> modularity/libmodulemd;protocol=https;branch=main;tag=${PV}"
> 
> -PV = "2.15.1"
>  SRCREV = "e7f179eeeb6eee1403f090fc43a3c80bb08b5bfd"
> 
>  S = "${WORKDIR}/git"
> --
> 2.43.0
Ross Burton June 5, 2025, 3:54 p.m. UTC | #2
On 5 Jun 2025, at 16:52, Marko, Peter <Peter.Marko@siemens.com> wrote:
> Adding tag to SRC_URI should be done only on recipe upgrade.
> Reason is that build will fail if shallow tarball is generated before this change as it does not contain the tag.
> If we want to add tags to all recipes which are missing it. bitbake needs to be adapted to add tag names to filename to distinguish old and new shallow tarballs.

[shakes fist at bitbake]

I had a feeling someone had a reason why this was a bad idea but I couldn’t remember why…

v2 incoming…

Ross
Richard Purdie June 5, 2025, 8:16 p.m. UTC | #3
On Thu, 2025-06-05 at 15:52 +0000, Peter Marko via
lists.openembedded.org wrote:
> Adding tag to SRC_URI should be done only on recipe upgrade.
> Reason is that build will fail if shallow tarball is generated before
> this change as it does not contain the tag.
> If we want to add tags to all recipes which are missing it. bitbake
> needs to be adapted to add tag names to filename to distinguish old
> and new shallow tarballs.

FWIW this recipe was literally just upgraded so we should be ok here.

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb b/meta/recipes-devtools/libmodulemd/libmodulemd_2.15.1.bb
similarity index 95%
rename from meta/recipes-devtools/libmodulemd/libmodulemd_git.bb
rename to meta/recipes-devtools/libmodulemd/libmodulemd_2.15.1.bb
index 0c730329230..10aa6c543c3 100644
--- a/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb
+++ b/meta/recipes-devtools/libmodulemd/libmodulemd_2.15.1.bb
@@ -4,9 +4,8 @@  DESCRIPTION = "${SUMMARY}"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=25a3927bff3ee4f5b21bcb0ed3fcd6bb"
 
-SRC_URI = "git://github.com/fedora-modularity/libmodulemd;protocol=https;branch=main"
+SRC_URI = "git://github.com/fedora-modularity/libmodulemd;protocol=https;branch=main;tag=${PV}"
 
-PV = "2.15.1"
 SRCREV = "e7f179eeeb6eee1403f090fc43a3c80bb08b5bfd"
 
 S = "${WORKDIR}/git"