Jamin Lin
6d3b93af2e
uboot-sign.bbclass: Refactor condition checks to use && and || instead of -a and -o
...
This commit cleans up and modernizes the shell condition expressions in
`uboot-sign.bbclass` to follow best practices for portable and reliable shell usage.
Key changes:
- Replace legacy `[ -a ]` and `[ -o ]` with explicit `[ ] && [ ]` and `[ ] || [ ]`.
Modern POSIX and busybox sh recommend using `&&` and `||` instead of `-a` and `-o`
because `-a` and `-o` are less robust and can cause parsing ambiguities in some shells.
- Simplify `concat_dtb()` by moving the DTB existence check to the top and using
early `return` to avoid deep nesting.
- Remove redundant fallback `else` blocks; use clearer control flow with direct checks.
This improves maintainability, reduces shell syntax pitfalls, and aligns with
current shell scripting best practices.
References:
- POSIX recommends avoiding `-a` and `-o` in `[ ]` and using explicit `&&` and `||`:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
(From OE-Core rev: d2740e39800a044d557b620e38ca0ac1b8c6d030)
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com >
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com >
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org >
2025-06-19 21:54:43 +01:00
..
2024-01-18 10:15:58 +00:00
2022-08-12 15:27:17 +01:00
2025-03-18 11:25:36 +00:00
2025-06-05 11:02:22 +01:00
2024-07-26 12:28:42 +01:00
2022-08-12 15:27:17 +01:00
2023-10-30 08:50:46 +00:00
2022-08-12 15:27:17 +01:00
2022-08-12 15:27:17 +01:00
2023-08-21 16:15:35 +01:00
2025-02-25 12:17:22 +00:00
2024-08-03 07:56:10 +01:00
2025-03-25 21:20:41 +00:00
2024-06-10 14:27:23 +01:00
2025-05-01 14:22:53 +01:00
2025-03-03 18:01:29 +00:00
2022-08-12 15:27:17 +01:00
2024-11-07 22:17:24 +00:00
2022-08-12 15:27:17 +01:00
2022-08-12 15:27:17 +01:00
2022-08-12 15:27:17 +01:00
2024-12-05 17:07:10 +00:00
2024-11-23 14:44:54 +00:00
2024-07-26 12:28:42 +01:00
2025-06-09 17:43:41 +01:00
2025-06-16 22:26:38 +01:00
2024-11-21 12:16:28 +00:00
2022-08-12 15:27:17 +01:00
2025-06-05 11:02:21 +01:00
2023-08-24 16:50:24 +01:00
2022-08-12 15:27:17 +01:00
2022-08-12 15:27:17 +01:00
2024-12-23 11:41:38 +00:00
2025-04-23 09:47:42 +01:00
2023-01-26 22:22:53 +00:00
2022-08-12 15:27:17 +01:00
2022-08-12 15:27:17 +01:00
2023-08-21 11:34:12 +01:00
2025-04-23 09:47:42 +01:00
2022-09-28 08:01:10 +01:00
2024-01-18 10:15:58 +00:00
2024-09-20 10:45:45 +01:00
2022-08-12 15:27:17 +01:00
2025-03-03 18:01:30 +00:00
2024-04-23 13:40:24 +01:00
2024-01-19 12:21:22 +00:00
2024-01-19 12:21:22 +00:00
2025-01-20 13:38:59 +00:00
2022-08-12 15:27:17 +01:00
2022-08-12 15:27:17 +01:00
2024-01-12 11:54:05 +00:00
2025-02-01 13:42:34 +00:00
2025-04-23 09:47:42 +01:00
2025-06-02 22:17:24 +01:00
2025-02-10 13:03:57 +00:00
2023-06-29 11:28:32 +01:00
2023-09-09 22:14:41 +01:00
2022-08-12 15:27:17 +01:00
2024-04-04 14:05:03 +01:00
2022-08-12 15:27:17 +01:00
2025-05-12 22:01:56 +01:00
2025-05-01 14:22:53 +01:00
2023-03-22 13:53:29 +00:00
2023-06-29 11:28:32 +01:00
2025-06-05 11:02:21 +01:00
2025-06-05 11:02:22 +01:00
2022-08-12 15:27:17 +01:00
2025-06-12 11:03:43 +01:00
2025-06-05 11:02:22 +01:00
2025-06-05 11:02:21 +01:00
2025-05-08 23:16:54 +01:00
2025-06-05 11:02:22 +01:00
2023-07-25 15:27:33 +01:00
2022-08-12 15:27:17 +01:00
2024-02-29 10:26:13 +00:00
2024-10-25 15:37:10 +01:00
2022-08-12 15:27:17 +01:00
2023-07-25 15:27:33 +01:00
2024-06-11 11:41:33 +01:00
2024-01-18 10:15:58 +00:00
2025-04-23 09:47:42 +01:00
2024-02-23 14:29:03 +00:00
2025-05-08 10:28:18 +01:00
2022-08-12 15:27:17 +01:00
2022-08-12 15:27:17 +01:00
2023-07-25 15:27:33 +01:00
2025-05-08 10:28:19 +01:00
2022-08-12 15:27:17 +01:00
2024-07-18 17:21:39 +01:00
2025-03-18 10:27:31 +00:00
2025-04-23 09:47:42 +01:00
2022-08-12 15:27:17 +01:00
2024-07-13 23:28:31 +01:00
2025-04-10 11:05:34 +01:00
2024-02-19 15:21:14 +00:00
2024-02-21 22:20:10 +00:00
2024-01-18 10:15:58 +00:00
2023-05-04 12:34:30 +01:00
2022-08-12 15:27:17 +01:00
2025-04-23 09:47:42 +01:00
2022-08-12 15:27:17 +01:00
2025-05-12 22:01:56 +01:00
2025-06-05 11:02:22 +01:00
2022-08-12 15:27:17 +01:00
2025-05-15 10:55:26 +01:00
2022-08-12 15:27:17 +01:00
2024-05-21 12:08:04 +01:00
2025-01-14 11:57:52 +00:00
2024-08-29 21:58:19 +01:00
2024-12-17 11:41:52 +00:00
2024-10-25 15:04:30 +01:00
2025-02-01 13:42:34 +00:00
2023-05-05 11:07:25 +01:00
2024-08-15 14:51:55 +01:00
2023-06-02 14:41:50 +01:00
2023-12-17 19:07:21 +00:00
2024-11-12 23:54:35 +00:00
2024-11-21 12:16:28 +00:00
2022-08-12 15:27:17 +01:00
2025-02-01 13:42:34 +00:00
2023-07-25 15:27:33 +01:00
2022-08-12 15:27:17 +01:00
2025-05-01 14:22:54 +01:00
2024-07-04 22:56:15 +01:00
2022-08-12 15:27:17 +01:00
2024-01-18 10:15:58 +00:00
2023-07-10 11:36:34 +01:00
2025-03-09 20:10:06 +00:00
2023-09-09 22:14:41 +01:00
2025-02-01 13:20:45 +00:00
2025-04-01 22:08:36 +01:00
2025-02-01 13:42:34 +00:00
2024-08-23 09:12:38 +01:00
2025-05-27 09:01:16 +01:00
2025-02-18 12:04:03 +00:00
2025-05-27 09:01:16 +01:00
2024-05-31 16:58:36 +01:00
2024-10-15 11:47:24 +01:00
2022-08-12 15:27:17 +01:00
2023-09-26 10:35:28 +01:00
2022-08-12 15:27:17 +01:00
2025-06-02 22:17:24 +01:00
2024-12-12 13:22:08 +00:00
2025-05-15 10:55:26 +01:00
2025-05-12 22:01:55 +01:00
2022-08-12 15:27:17 +01:00
2022-08-12 15:27:17 +01:00
2025-05-12 22:01:55 +01:00
2025-03-11 11:20:34 +00:00
2025-01-20 13:39:00 +00:00
2025-06-19 21:54:43 +01:00
2025-04-17 11:03:22 +01:00
2025-06-05 21:19:12 +01:00
2023-01-12 23:08:58 +00:00
2022-08-12 15:27:17 +01:00
2022-08-12 15:27:17 +01:00
2024-03-01 09:31:10 +00:00
2024-01-12 11:54:05 +00:00