<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 21, 2016 at 12:05 AM, Mikko Ylinen <span dir="ltr">&lt;<a href="mailto:mikko.ylinen@intel.com" target="_blank">mikko.ylinen@intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":2sa" class="a3s aXjCH m157e6228ee82d47a">The change to get rid of FuncFailed exceptions changed the behavior<br>
of how missing uid/gid error are be handled. Instead of catching<br>
the exception and handling that via bb.parse.SkipPackage(), a fatal<br>
error was called.<br>
<br>
This won&#39;t work with recipes that are unused and therefore do not have<br>
UID/GIDs defined. The problem triggers when parsing all recipes (e.g.,<br>
oe-selftest runs bitbake -p).<br>
<br>
The right way to handle this is to raise bb.parse.SkipPackage(). This<br>
will error correctly once the recipe is needed.<br>
<br>
Signed-off-by: Mikko Ylinen &lt;<a href="mailto:mikko.ylinen@intel.com">mikko.ylinen@intel.com</a>&gt;<br>
---<br>
 meta/classes/useradd-<wbr>staticids.bbclass | 5 ++---<br>
 1 file changed, 2 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/meta/classes/useradd-<wbr>staticids.bbclass b/meta/classes/useradd-<wbr>staticids.bbclass<br>
index afb580a..4162774 100644<br>
--- a/meta/classes/useradd-<wbr>staticids.bbclass<br>
+++ b/meta/classes/useradd-<wbr>staticids.bbclass<br>
@@ -53,8 +53,7 @@ def update_useradd_static_config(<wbr>d):<br>
     def handle_missing_id(id, type, pkg):<br>
         # For backwards compatibility we accept &quot;1&quot; in addition to &quot;error&quot;<br>
         if d.getVar(&#39;USERADD_ERROR_<wbr>DYNAMIC&#39;, True) == &#39;error&#39; or d.getVar(&#39;USERADD_ERROR_<wbr>DYNAMIC&#39;, True) == &#39;1&#39;:<br>
-            #bb.error(&quot;Skipping recipe %s, package %s which adds %sname %s does not have a static ID defined.&quot; % (d.getVar(&#39;PN&#39;, True),  pkg, type, id))<br>
-            bb.fatal(&quot;%s - %s: %sname %s does not have a static ID defined.&quot; % (d.getVar(&#39;PN&#39;, True), pkg, type, id))<br>
+            raise NotImplementedError(&quot;%s - %s: %sname %s does not have a static ID defined. Skipping it.&quot; % (d.getVar(&#39;PN&#39;, True), pkg, type, id))<br>
         elif d.getVar(&#39;USERADD_ERROR_<wbr>DYNAMIC&#39;, True) == &#39;warn&#39;:<br>
             bb.warn(&quot;%s - %s: %sname %s does not have a static ID defined.&quot; % (d.getVar(&#39;PN&#39;, True), pkg, type, id))<br>
<br>
@@ -323,7 +322,7 @@ python __anonymous() {<br>
         and not bb.data.inherits_class(&#39;<wbr>native&#39;, d):<br>
         try:<br>
             update_useradd_static_config(<wbr>d)<br>
-        except bb.build.FuncFailed as f:<br>
+        except NotImplementedError as f:<br>
             bb.debug(1, &quot;Skipping recipe %s: %s&quot; % (d.getVar(&#39;PN&#39;, True), f))<br>
             raise bb.parse.SkipPackage(f)</div></blockquote></div><br>NotImplementedError is not the right exception for this.<br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Christopher Larson<br>clarson at kergoth dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div>
</div></div>