[oe-commits] [openembedded-core] 04/04: license.bbclass: be a bit more strict when searching ${PN}-${LICENSE_PACKAGE_SUFFIX} in packages

git at git.openembedded.org git at git.openembedded.org
Mon Apr 9 11:12:51 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch sumo-next
in repository openembedded-core.

commit 9b9897fc034819385a9d4ce591cc79dd458f3f24
Author: Martin Jansa <martin.jansa at gmail.com>
AuthorDate: Sun Apr 8 20:16:00 2018 +0000

    license.bbclass: be a bit more strict when searching ${PN}-${LICENSE_PACKAGE_SUFFIX} in packages
    
    * linux-firmware contains ${PN}-license package since this commit:
      commit 1ee083da0730408fffdbbf5f29abc299c0e61be9
      Author: Jackie Huang <jackie.huang at windriver.com>
      Date:   Mon Apr 13 10:17:21 2015 +0800
    
        linux-firmware: fix the mess of licenses
    * LICENSE_CREATE_PACKAGE functionality in license.bbclass when enabled
      adds new package with suffix:
      LICENSE_PACKAGE_SUFFIX ??= "-lic"
      but then it checks if ${PN}-${LICENSE_PACKAGE_SUFFIX} is included
      in PACKAGES before adding it and when found it shows:
      WARNING: linux-firmware-1_0.0+gitAUTOINC+4c0bf113a5-r0 do_package: linux-firmware-lic package already existed in linux-firmware.
      and doesn't add the ${PN}-lic to PACKAGES and causes another warning:
      WARNING: linux-firmware-1_0.0+gitAUTOINC+4c0bf113a5-r0 do_package: QA Issue: linux-firmware: Files/directories were installed but not shipped in any package:
      /usr
      /usr/share
      /usr/share/licenses
      /usr/share/licenses/linux-firmware
    
      that's because it was searching ${PN}-lic in PACKAGES as a string
      so it found ${PN}-lic as a substring of ${PN}-license, add a split
      to search in an list
    
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/license.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 9ac7e0b..06dd4a8 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -334,7 +334,7 @@ def add_package_and_files(d):
     files = d.getVar('LICENSE_FILES_DIRECTORY')
     pn = d.getVar('PN')
     pn_lic = "%s%s" % (pn, d.getVar('LICENSE_PACKAGE_SUFFIX', False))
-    if pn_lic in packages:
+    if pn_lic in packages.split():
         bb.warn("%s package already existed in %s." % (pn_lic, pn))
     else:
         # first in PACKAGES to be sure that nothing else gets LICENSE_FILES_DIRECTORY

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list