diff options
author | Marcus Flyckt <marcus.flyckt@gmail.com> | 2023-10-06 08:23:57 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-08 13:05:25 +0100 |
commit | 561c63e94710a755227357e90004aafa63ec9c7e (patch) | |
tree | dfed668b0421a381fb928ac0b11888d375aa44a9 /scripts/lib/devtool/upgrade.py | |
parent | 23a50c8cca9dc5079ddd91b8281e66386a6af54e (diff) | |
download | poky-561c63e94710a755227357e90004aafa63ec9c7e.tar.gz |
devtool/upgrade: check all git config locations
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`.
(From OE-Core rev: 30a9f7de45050c8bac49d4b37419cc2e067a75fa)
Signed-off-by: Marcus Flyckt <marcus.flyckt@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/upgrade.py')
-rw-r--r-- | scripts/lib/devtool/upgrade.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 487308912f..9cd50be3a2 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py | |||
@@ -442,7 +442,7 @@ def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, srcsubdir_old, src | |||
442 | def _check_git_config(): | 442 | def _check_git_config(): |
443 | def getconfig(name): | 443 | def getconfig(name): |
444 | try: | 444 | try: |
445 | value = bb.process.run('git config --global %s' % name)[0].strip() | 445 | value = bb.process.run('git config %s' % name)[0].strip() |
446 | except bb.process.ExecutionError as e: | 446 | except bb.process.ExecutionError as e: |
447 | if e.exitcode == 1: | 447 | if e.exitcode == 1: |
448 | value = None | 448 | value = None |