diff options
| author | Enrico Jörns <ejo@pengutronix.de> | 2024-11-15 13:19:12 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-04-16 08:04:42 -0700 |
| commit | 71e6160da0aa5d1368b2ce8d3c93ebc5c882c612 (patch) | |
| tree | 1601daeb08c565bba0313018bd923715c5d2b45e | |
| parent | 0573c4c996528852ff1c92ccafe1b51486a55c80 (diff) | |
| download | meta-openembedded-71e6160da0aa5d1368b2ce8d3c93ebc5c882c612.tar.gz | |
fitimage.bbclass: fix error handling for missing recipe
The 'image' name should be printed rather than the (unset) 'recipe'.
Also use f-strings for better readability.
Since a missing recipe configuration is fatal to a proper generation,
abort the parsing with bb.fatal instead of continuing with a broken
configuration.
Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
| -rw-r--r-- | meta-oe/classes/fitimage.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta-oe/classes/fitimage.bbclass b/meta-oe/classes/fitimage.bbclass index 03c01a1ed3..9be35ae5e3 100644 --- a/meta-oe/classes/fitimage.bbclass +++ b/meta-oe/classes/fitimage.bbclass | |||
| @@ -106,7 +106,7 @@ python __anonymous() { | |||
| 106 | recipe = d.getVar('FITIMAGE_IMAGE_%s' % image) | 106 | recipe = d.getVar('FITIMAGE_IMAGE_%s' % image) |
| 107 | 107 | ||
| 108 | if not recipe: | 108 | if not recipe: |
| 109 | bb.error("No recipe set for image '%s'. Specify via 'FITIMAGE_IMAGE_%s = \"<recipe-name>\"'" % (recipe, image)) | 109 | bb.fatal(f"No recipe set for image '{image}'. Specify via 'FITIMAGE_IMAGE_{image} = \"<recipe-name>\"'") |
| 110 | return | 110 | return |
| 111 | 111 | ||
| 112 | d.appendVarFlag('do_unpack', 'vardeps', ' FITIMAGE_IMAGE_%s' % image) | 112 | d.appendVarFlag('do_unpack', 'vardeps', ' FITIMAGE_IMAGE_%s' % image) |
