summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2025-03-17 18:13:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-19 12:09:06 +0000
commit9eb610fb74f25f40b9e2b06052cd281b272a2cb8 (patch)
tree1ace28ce5b43482cbadb63ecc17da2d83212fa53
parent7c969b75fef3cafcd9a31ad18ccb47856ea57c17 (diff)
downloadpoky-9eb610fb74f25f40b9e2b06052cd281b272a2cb8.tar.gz
devtool: Do not create annotated tags if tag.gpgSign is set
If tag.gpgSign is configured in Git's configuration, then creating the devtool-base tag will fail (if Git's core.editor is not configured) or it will hang (when trying to open the editor). This is beacause tag.gpgSign causes git tag to create annotated tags. To avoid this, specify --no-sign as argument to git tag. (From OE-Core rev: f96e955b29aad6a9e0b20f8e9a4987ace3808c91) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/devtool/__init__.py4
-rw-r--r--scripts/lib/devtool/upgrade.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
index 6133c1c5b4..fa6e1a34fd 100644
--- a/scripts/lib/devtool/__init__.py
+++ b/scripts/lib/devtool/__init__.py
@@ -234,7 +234,7 @@ def setup_git_repo(repodir, version, devbranch, basetag='devtool-base', d=None):
234 f.write(line) 234 f.write(line)
235 235
236 bb.process.run('git checkout -b %s' % devbranch, cwd=repodir) 236 bb.process.run('git checkout -b %s' % devbranch, cwd=repodir)
237 bb.process.run('git tag -f %s' % basetag, cwd=repodir) 237 bb.process.run('git tag -f --no-sign %s' % basetag, cwd=repodir)
238 238
239 # if recipe unpacks another git repo inside S, we need to declare it as a regular git submodule now, 239 # if recipe unpacks another git repo inside S, we need to declare it as a regular git submodule now,
240 # so we will be able to tag branches on it and extract patches when doing finish/update on the recipe 240 # so we will be able to tag branches on it and extract patches when doing finish/update on the recipe
@@ -256,7 +256,7 @@ def setup_git_repo(repodir, version, devbranch, basetag='devtool-base', d=None):
256 oe.patch.GitApplyTree.commitIgnored("Add additional submodule from SRC_URI", dir=os.path.join(root, ".."), d=d) 256 oe.patch.GitApplyTree.commitIgnored("Add additional submodule from SRC_URI", dir=os.path.join(root, ".."), d=d)
257 found = False 257 found = False
258 if os.path.exists(os.path.join(repodir, '.gitmodules')): 258 if os.path.exists(os.path.join(repodir, '.gitmodules')):
259 bb.process.run('git submodule foreach --recursive "git tag -f %s"' % basetag, cwd=repodir) 259 bb.process.run('git submodule foreach --recursive "git tag -f --no-sign %s"' % basetag, cwd=repodir)
260 260
261def recipe_to_append(recipefile, config, wildcard=False): 261def recipe_to_append(recipefile, config, wildcard=False):
262 """ 262 """
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index 94b6c11a37..9abf72eccf 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -188,9 +188,9 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee
188 if uri.startswith('git://') or uri.startswith('gitsm://'): 188 if uri.startswith('git://') or uri.startswith('gitsm://'):
189 __run('git fetch') 189 __run('git fetch')
190 __run('git checkout %s' % rev) 190 __run('git checkout %s' % rev)
191 __run('git tag -f devtool-base-new') 191 __run('git tag -f --no-sign devtool-base-new')
192 __run('git submodule update --recursive') 192 __run('git submodule update --recursive')
193 __run('git submodule foreach \'git tag -f devtool-base-new\'') 193 __run('git submodule foreach \'git tag -f --no-sign devtool-base-new\'')
194 (stdout, _) = __run('git submodule --quiet foreach \'echo $sm_path\'') 194 (stdout, _) = __run('git submodule --quiet foreach \'echo $sm_path\'')
195 paths += [os.path.join(srctree, p) for p in stdout.splitlines()] 195 paths += [os.path.join(srctree, p) for p in stdout.splitlines()]
196 checksums = {} 196 checksums = {}
@@ -257,7 +257,7 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee
257 useroptions = [] 257 useroptions = []
258 oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=rd) 258 oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=rd)
259 __run('git %s commit -q -m "Commit of upstream changes at version %s" --allow-empty' % (' '.join(useroptions), newpv)) 259 __run('git %s commit -q -m "Commit of upstream changes at version %s" --allow-empty' % (' '.join(useroptions), newpv))
260 __run('git tag -f devtool-base-%s' % newpv) 260 __run('git tag -f --no-sign devtool-base-%s' % newpv)
261 261
262 revs = {} 262 revs = {}
263 for path in paths: 263 for path in paths: