]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
useradd-staticids.bbclass: improve error message
authorMikko Rapeli <mikko.rapeli@linaro.org>
Tue, 13 Jun 2023 08:02:16 +0000 (11:02 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 15 Jun 2023 08:53:34 +0000 (09:53 +0100)
Current error message is difficult to read:

ERROR: Nothing PROVIDES 'image'
trs-image was skipped: image - image: normal username test does not have a static ID defined. Add test to one of these files

It's not clear that first "image" is recipe name, second "image" is
binary package name and that "test" is the user account which does not
have a static ID defined. Improve the error message so that these are
more explicit. Now the error message looks like:

image was skipped: Recipe image, package image: normal username "test" does not have a static ID defined.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/classes/useradd-staticids.bbclass

index abe484eb46818fc408004332599279599b35475a..1dbcba2bf185cbc4af6716d246d33afea9f9a66a 100644 (file)
@@ -47,7 +47,7 @@ def update_useradd_static_config(d):
     def handle_missing_id(id, type, pkg, files, var, value):
         # For backwards compatibility we accept "1" in addition to "error"
         error_dynamic = d.getVar('USERADD_ERROR_DYNAMIC')
-        msg = "%s - %s: %sname %s does not have a static ID defined." % (d.getVar('PN'), pkg, type, id)
+        msg = 'Recipe %s, package %s: %sname "%s" does not have a static ID defined.' % (d.getVar('PN'), pkg, type, id)
         if files:
             msg += " Add %s to one of these files: %s" % (id, files)
         else: