summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikko Rapeli <mikko.rapeli@linaro.org>2023-06-13 11:02:16 +0300
committerSteve Sakoman <steve@sakoman.com>2023-07-12 05:11:38 -1000
commitc7bc5446a6dd6869a235f59fc43b76f423bcea8f (patch)
tree8770eb06378cd983a15735c3865c6baeaeffdfb0
parentd2a1c3e5d7c63f1b3a75740772fcb1430bfbc421 (diff)
downloadpoky-c7bc5446a6dd6869a235f59fc43b76f423bcea8f.tar.gz
useradd-staticids.bbclass: improve error message
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. (From OE-Core rev: 572c507736b2fcc31f7f13cb3da0d5be361838f5) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 07898218f3908a83e07178b6530dfa48d55d4ec2) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/classes/useradd-staticids.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass
index 3acf59cd46..e5527f0529 100644
--- a/meta/classes/useradd-staticids.bbclass
+++ b/meta/classes/useradd-staticids.bbclass
@@ -41,7 +41,7 @@ def update_useradd_static_config(d):
41 def handle_missing_id(id, type, pkg, files, var, value): 41 def handle_missing_id(id, type, pkg, files, var, value):
42 # For backwards compatibility we accept "1" in addition to "error" 42 # For backwards compatibility we accept "1" in addition to "error"
43 error_dynamic = d.getVar('USERADD_ERROR_DYNAMIC') 43 error_dynamic = d.getVar('USERADD_ERROR_DYNAMIC')
44 msg = "%s - %s: %sname %s does not have a static ID defined." % (d.getVar('PN'), pkg, type, id) 44 msg = 'Recipe %s, package %s: %sname "%s" does not have a static ID defined.' % (d.getVar('PN'), pkg, type, id)
45 if files: 45 if files:
46 msg += " Add %s to one of these files: %s" % (id, files) 46 msg += " Add %s to one of these files: %s" % (id, files)
47 else: 47 else: