<div dir="ltr"><div>Hi Robert,</div><div><br></div><div>I understand. Though LICENSE_CREATE_PACKAGE is disabled by default in OE-core, if some users want to create ${PN}-lic package for each recipe</div><div>via LICENSE_CREATE_PACKAGE = &quot;1&quot;, then they are going to have host contamination  warnings for each recipe.</div><div><br></div><div>The above commit indicated by Martin does create ${PN}-lic package when</div><div>LICENSE_CREATE_PACKAGE = &quot;1&quot;.</div><div><br></div><div>Regards,</div><div>Jagadeesh</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 25, 2015 at 4:04 PM, Martin Jansa <span dir="ltr">&lt;<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Nov 25, 2015 at 04:42:57PM +0800, Robert Yang wrote:<br>
&gt;<br>
&gt; Hi Jagadeesh,<br>
&gt;<br>
&gt; Thanks, usually, patch should go into master branch before go into stable<br>
&gt; branch such as jethro. IMHO, jethro branch may not take this fix even if<br>
&gt; master merges it. The problem is that oe-core doesn&#39;t create package for<br>
&gt; ${PN}-lic atm, this patch is treated as part of the enhancement which is<br>
&gt; used for working with creating ${PN}-lic.<br>
<br>
</span>Why do you think it isn&#39;t able to create ${PN}-lic when configured to do<br>
so?<br>
<br>
commit dc78ef91a2bf01efb8028c9afbe69e506e016265<br>
Author: Martin Jansa &lt;<a href="mailto:martin.jansa@gmail.com">martin.jansa@gmail.com</a>&gt;<br>
Date:   Thu Jan 17 12:49:44 2013 +0100<br>
<br>
    license.bbclass: package license texts to PN-lic when<br>
LICENSE_CREATE_PACKAGE is enabled<br>
<br>
is already in dylan release.<br>
<div class="HOEnZb"><div class="h5"><br>
&gt; // Robert<br>
&gt;<br>
&gt; On 11/25/2015 02:54 PM, Jagadeesh Krishnanjanappa wrote:<br>
&gt; &gt; We get below host contamination warnings of license files for<br>
&gt; &gt; each recipe, when we try to create a separate ${PN}-lic package (which<br>
&gt; &gt; contains license files), by setting LICENSE_CREATE_PACKAGE equal to &quot;1&quot;<br>
&gt; &gt; in local.conf.<br>
&gt; &gt;<br>
&gt; &gt; -- snip --<br>
&gt; &gt; WARNING: QA Issue: libcgroup: /libcgroup-lic/usr/share/licenses/libcgroup/generic_LGPLv2.1 is owned by uid 5001, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]<br>
&gt; &gt; WARNING: QA Issue: attr: /attr-lic/usr/share/licenses/attr/libattr.c is owned by uid 5001, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]<br>
&gt; &gt; WARNING: QA Issue: bash: /bash-lic/usr/share/licenses/bash/COPYING is owned by uid 5001, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]<br>
&gt; &gt; -- CUT --<br>
&gt; &gt;<br>
&gt; &gt; Since the license files from source and OE-core, are populated in a normal<br>
&gt; &gt; shell environment rather in pseudo environment (fakeroot); the ownership of<br>
&gt; &gt; these files will be same as host user running bitbake. During the do_package<br>
&gt; &gt; task (which runs in pseudo environment (fakeroot)), os.link preserves the<br>
&gt; &gt; ownership of these license files as host user instead of root user.<br>
&gt; &gt; This causes license files to have UID same as host user id and resulting in<br>
&gt; &gt; above warnings during do_package_qa task.<br>
&gt; &gt;<br>
&gt; &gt; Changing ownership of license files to root user under fakeroot environment<br>
&gt; &gt; will solve above warnings, and on exiting fakeroot environment the license<br>
&gt; &gt; files will continue to be owned by host user.<br>
&gt; &gt;<br>
&gt; &gt; Signed-off-by: Jagadeesh Krishnanjanappa &lt;<a href="mailto:jkrishnanjanappa@mvista.com">jkrishnanjanappa@mvista.com</a>&gt;<br>
&gt; &gt; ---<br>
&gt; &gt;   meta/classes/license.bbclass | 1 +<br>
&gt; &gt;   1 file changed, 1 insertion(+)<br>
&gt; &gt;<br>
&gt; &gt; diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass<br>
&gt; &gt; index c616a20..d400ac0 100644<br>
&gt; &gt; --- a/meta/classes/license.bbclass<br>
&gt; &gt; +++ b/meta/classes/license.bbclass<br>
&gt; &gt; @@ -185,6 +185,7 @@ def copy_license_files(lic_files_paths, destdir):<br>
&gt; &gt;                   os.remove(dst)<br>
&gt; &gt;               if os.access(src, os.W_OK) and (os.stat(src).st_dev == os.stat(destdir).st_dev):<br>
&gt; &gt;                   os.link(src, dst)<br>
&gt; &gt; +                os.chown(dst,os.getuid(),os.getgid())<br>
&gt; &gt;               else:<br>
&gt; &gt;                   shutil.copyfile(src, dst)<br>
&gt; &gt;           except Exception as e:<br>
&gt; &gt;<br>
</div></div><span class="HOEnZb"><font color="#888888">&gt; --<br>
&gt; _______________________________________________<br>
&gt; Openembedded-core mailing list<br>
&gt; <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
&gt; <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
<br>
--<br>
Martin &#39;JaMa&#39; Jansa     jabber: <a href="mailto:Martin.Jansa@gmail.com">Martin.Jansa@gmail.com</a><br>
</font></span></blockquote></div><br></div>