]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
devtool/upgrade: check all git config locations
authorMarcus Flyckt <marcus.flyckt@gmail.com>
Fri, 6 Oct 2023 06:23:57 +0000 (08:23 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 8 Oct 2023 12:05:24 +0000 (13:05 +0100)
Fixes [YOCTO #15222]

In some situations its more practical to keep git configuration
at `/etc/gitconfig` instead of `$HOME/.gitconfig` (e.g., when mounting
git configuration into a docker container).

This change makes `devtool upgrade` consider any available
git configuration instead of only checking `--global`.

Signed-off-by: Marcus Flyckt <marcus.flyckt@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
scripts/lib/devtool/upgrade.py

index 487308912f7ff099607dadf320c9650c6b5c483f..9cd50be3a25ec534c7275a256c4498380b060cf1 100644 (file)
@@ -442,7 +442,7 @@ def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, srcsubdir_old, src
 def _check_git_config():
     def getconfig(name):
         try:
-            value = bb.process.run('git config --global %s' % name)[0].strip()
+            value = bb.process.run('git config %s' % name)[0].strip()
         except bb.process.ExecutionError as e:
             if e.exitcode == 1:
                 value = None