summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-06-25 20:54:25 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-06-26 11:02:55 +0100
commit2e234162da158d74fbb5682f2fafc785691845aa (patch)
tree9b4cb68fc7468e6dfeff98f2e174ae5d6c8c0579 /bitbake/lib/bb/fetch2/git.py
parent5683fdc866333b4a3a78401d22dba9c349251eeb (diff)
downloadpoky-2e234162da158d74fbb5682f2fafc785691845aa.tar.gz
bitbake: fetch2/git: Add tag to shallow clone tarball name
It makes sense to allow the shallow clone mirror tarball name to include the tag name so that tags can be added to existing urls and the tarballs will be maintained correctly. The code already allows this to be done easily just by moving the tag handling code. (Bitbake rev: 68fce3be14e4dd801661f4ef302d229fb16a04b5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r--bitbake/lib/bb/fetch2/git.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index e7b030998c..14ec45a3f6 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -199,6 +199,8 @@ class Git(FetchMethod):
199 ud.shallow_skip_fast = False 199 ud.shallow_skip_fast = False
200 ud.shallow = d.getVar("BB_GIT_SHALLOW") == "1" 200 ud.shallow = d.getVar("BB_GIT_SHALLOW") == "1"
201 ud.shallow_extra_refs = (d.getVar("BB_GIT_SHALLOW_EXTRA_REFS") or "").split() 201 ud.shallow_extra_refs = (d.getVar("BB_GIT_SHALLOW_EXTRA_REFS") or "").split()
202 if 'tag' in ud.parm:
203 ud.shallow_extra_refs.append("refs/tags/" + ud.parm['tag'])
202 204
203 depth_default = d.getVar("BB_GIT_SHALLOW_DEPTH") 205 depth_default = d.getVar("BB_GIT_SHALLOW_DEPTH")
204 if depth_default is not None: 206 if depth_default is not None:
@@ -633,8 +635,6 @@ class Git(FetchMethod):
633 for line in all_refs_remote: 635 for line in all_refs_remote:
634 all_refs.append(line.split()[-1]) 636 all_refs.append(line.split()[-1])
635 extra_refs = [] 637 extra_refs = []
636 if 'tag' in ud.parm:
637 extra_refs.append("refs/tags/" + ud.parm['tag'])
638 for r in ud.shallow_extra_refs: 638 for r in ud.shallow_extra_refs:
639 if not ud.bareclone: 639 if not ud.bareclone:
640 r = r.replace('refs/heads/', 'refs/remotes/origin/') 640 r = r.replace('refs/heads/', 'refs/remotes/origin/')