poky/bitbake/bin
Enrico Jörns ed5b125698 bitbake: bitbake-diffsigs: fix handling when finding only a single sigfile
This fixes the following error when calling 'bitbake-dumpsig' or
'bitbake-diffsigs' when having only a single sigfile available:

| Traceback (most recent call last):
|   File "[..]/poky/bitbake/bin/bitbake-dumpsig", line 171, in <module>
|     files = find_siginfo_task(tinfoil, options.taskargs[0], options.taskargs[1])
|             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|   File "[..]/poky/bitbake/bin/bitbake-dumpsig", line 83, in find_siginfo_task
|     sig2 = latestsigs[1]
|            ~~~~~~~~~~^^^
| IndexError: list index out of range

Handle this by adding (and returning) the path for the second sigfile
only if one is found. This way it will work for both diffsigs and
dumpsig use case.

The calling argparse code already deals with find_siginfo_task()
returning only a single file.
For 'bitbake-dumpsig' it will just dump the single sigfile, for
'bitbake-diffsigs' it will emit a proper error message again:

| ERROR: Only one matching sigdata file found for the specified task (systemd configure)

(cherry picked from commit 25057d33e9131f3214a06bbb316c916c744f8f03)

(Bitbake rev: 4e443aeab9096b41c9e5ba41cd21027ecaa20285)

Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Patrick Vogelaar <patrick.vogelaar@belden.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-03-08 06:22:56 -08:00
..
bitbake bitbake: bitbake: Bump to version 2.8.0 2024-04-16 07:38:22 +01:00
bitbake-diffsigs bitbake: bitbake-diffsigs: fix handling when finding only a single sigfile 2025-03-08 06:22:56 -08:00
bitbake-dumpsig bitbake: bitbake-diffsigs: Merge with bitbake-dumpsig 2019-01-03 12:36:55 +00:00
bitbake-getvar bitbake: bitbake-getvar: Treat undefined variables as empty with --value 2023-09-28 12:38:26 +01:00
bitbake-hashclient bitbake: bitbake-hashclient: Warn on bad .netrc 2024-03-26 17:11:15 +00:00
bitbake-hashserv bitbake: hashserv: improve the loglevel error message to be more helpful 2024-02-19 11:58:12 +00:00
bitbake-layers bitbake: bitbake-layers: initialize tinfoil before registering command line arguments 2022-09-01 10:07:00 +01:00
bitbake-prserv bitbake: bitbake-prserv: replace deprecated optparse by argparse 2024-04-14 06:31:45 +01:00
bitbake-selftest bitbake: bitbake: enable python warnings at the first opportunity 2021-09-19 11:33:14 +01:00
bitbake-server bitbake: bin/utils: Ensure locale en_US.UTF-8 is available on the system 2022-12-08 10:49:53 +00:00
bitbake-worker bitbake: bitbake-worker: Fix silent hang issue caused by unexpected stdout content 2024-03-22 16:26:46 +00:00
git-make-shallow bitbake: git-make-shallow: support git's safe.bareRepository 2024-02-19 12:00:59 +00:00
toaster bitbake: toaster: Write logs to BUILDDIR/toaster_logs 2023-10-27 08:32:29 +01:00
toaster-eventreplay bitbake: toaster: Added new feature to import eventlogs from command line into toaster using replay functionality 2023-12-12 15:58:57 +00:00