Skip to contentSkip to conversation

Move 'tag=' for a few SRC_URIs to SRCREV

PATCH Applied Evade Flow 2 participants 4 messages Oct 8, 2012 – Oct 18, 2012

lore
Share & tools
lore

Evade Flow

author
#0 lore raw

cover Move 'tag=' for a few SRC_URIs to SRCREV

Sending in response to:

- http://lists.yoctoproject.org/pipermail/yocto/2012-September/011802.html

Building with BB_NO_NETWORK can fail if recipes specify 'tag=' in SRC_URI, since bitbake must contact the source repository to verify which hash the tag currently points to. Since tags can, in principle, change, current best practice is to omit 'tag=' from SRC_URIs and instead specify the required revision hash in SRCREV.

SHA hashes *cannot* change, so they should not need to be checked, in theory; however, bitbake currently has no mechanism for distinguishing between human-friendly tags like 'v2.1.2' and SHA-1 sums like 'fdb6c0402337d9607c7a39155088eaf033742752': both will result in a call to git ls-remote to verify the tag, which is problematic for BB_NO_NETWORK builds.

The second part of this patch was, I think, already submitted, but not yet applied to master[?]:

- http://lists.yoctoproject.org/pipermail/yocto/2012-September/011949.html

Evade Flow (2):
Move 'tag=' to SRCREV in btrfs-tools recipe
Move 'tag=' to SRCREV in mtd-utils recipe

 .../btrfs-tools/btrfs-tools_git.bb                 |    3 ++-
 meta/recipes-devtools/mtd/mtd-utils_1.5.0.bb       |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 1/2 Move 'tag=' to SRCREV in btrfs-tools recipe

---
 .../btrfs-tools/btrfs-tools_git.bb                 |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb +2 -1
index c2ae298..e963a74 100644
@@ -12,7 +12,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
 SECTION = "base"
 DEPENDS = "util-linux attr"
 
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git;protocol=git;tag=fdb6c0402337d9607c7a39155088eaf033742752;branch=master"
+SRCREV = "fdb6c0402337d9607c7a39155088eaf033742752"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git;protocol=git"
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
1.7.9.5
author
#2 lore raw

PATCH 2/2 Move 'tag=' to SRCREV in mtd-utils recipe

In reply to Evade Flow
---
 meta/recipes-devtools/mtd/mtd-utils_1.5.0.bb |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/mtd/mtd-utils_1.5.0.bb +2 -1
index 1a9d4d3..bdfb022 100644
@@ -6,7 +6,8 @@ LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
                     file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
 
-SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=ca39eb1d98e736109c64ff9c1aa2a6ecca222d8f \
+SRCREV = "ca39eb1d98e736109c64ff9c1aa2a6ecca222d8f"
+SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git \
 		file://add-exclusion-to-mkfs-jffs2-git-2.patch"
 
 S = "${WORKDIR}/git/"
Signature · 1 line
1.7.9.5
Applied
#3 lore raw
In reply to Evade Flow
Quoted 20 lines · Evade Flow

Sending in response to:

- http://lists.yoctoproject.org/pipermail/yocto/2012-September/011802.html

Building with BB_NO_NETWORK can fail if recipes specify 'tag=' in SRC_URI, since bitbake must contact the source repository to verify which hash the tag currently points to. Since tags can, in principle, change, current best practice is to omit 'tag=' from SRC_URIs and instead specify the required revision hash in SRCREV.

SHA hashes *cannot* change, so they should not need to be checked, in theory; however, bitbake currently has no mechanism for distinguishing between human-friendly tags like 'v2.1.2' and SHA-1 sums like 'fdb6c0402337d9607c7a39155088eaf033742752': both will result in a call to git ls-remote to verify the tag, which is problematic for BB_NO_NETWORK builds.

The second part of this patch was, I think, already submitted, but not yet applied to master[?]:

Quoted 6 lines

- http://lists.yoctoproject.org/pipermail/yocto/2012-September/011949.html

Evade Flow (2):
Move 'tag=' to SRCREV in btrfs-tools recipe
Move 'tag=' to SRCREV in mtd-utils recipe

In the future, please review the Commit & Patch Message Guidelines at
http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines

Quoted 5 lines
  .../btrfs-tools/btrfs-tools_git.bb                 |    3 ++-
  meta/recipes-devtools/mtd/mtd-utils_1.5.0.bb       |    3 ++-
  2 files changed, 4 insertions(+), 2 deletions(-)

Merged into OE-Core

Thanks
Sau!