summaryrefslogtreecommitdiffstats
path: root/scripts/lib/argparse_oe.py
diff options
context:
space:
mode:
authorNaftaly RALAMBOARIVONY <naftaly.ralamboarivony@smile.fr>2025-10-02 15:10:24 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-10-10 17:42:08 +0100
commit25fc7a8afbb3e6770cb57176e9b5560ede6e2840 (patch)
treebc6060a0605366602ce431a0d5b94056fc7fb34b /scripts/lib/argparse_oe.py
parent4b0a3b0f3cab0fa002925bd45a31defac7a679fe (diff)
downloadpoky-25fc7a8afbb3e6770cb57176e9b5560ede6e2840.tar.gz
patchtest: fix failure when oe-core repo is in detached HEAD
Patchtest fails when oe-core git repo is in a "detached HEAD" state: Error log: > File "/usr/lib/python3/dist-packages/git/repo/base.py", line 881, in active_branch return self.head.reference ^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3/dist-packages/git/refs/symbolic.py", line 311, in _get_reference raise TypeError("%s is a detached symbolic reference as it points to %r" % (self, sha)) TypeError: HEAD is a detached symbolic reference as it points to '3dd31d3b29730fa1130645d76bb71914ac036335' None In this case, no current branch is available for the clean operation. To fix this, updates the checkout logic: - if a current branch is available, use it, - otherwise, fall back to the commit pointed to by HEAD. This ensures that the script works correctly even when HEAD is detached. (From OE-Core rev: 1f46d27b913233d36af3a059fc3bf7dc37ae8aa9) Signed-off-by: Naftaly RALAMBOARIVONY <naftaly.ralamboarivony@smile.fr> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/argparse_oe.py')
0 files changed, 0 insertions, 0 deletions