]> code.ossystems Code Review - openembedded-core.git/commitdiff
license: Fix and extend recommendations for license packages.
authorAlp Özmert <info@ib-oezmert.de>
Fri, 29 Jun 2018 15:41:02 +0000 (17:41 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 2 Jul 2018 16:13:19 +0000 (17:13 +0100)
Changed package recommendations so that the license package of a
recipe is recommended for all packages of a recipe instead of for one
package given by the recipe name.

Pre-patch behaviour results in a missing recommendation when a recipe
does not have a package with the same name.

Signed-off-by: Alp Özmert <info@ib-oezmert.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/license.bbclass

index 06dd4a8c1171c39bfc6b683978a8d66d5888134d..141af5de4d360afe06bbbfe35f81bba25c9d534b 100644 (file)
@@ -340,6 +340,9 @@ def add_package_and_files(d):
         # first in PACKAGES to be sure that nothing else gets LICENSE_FILES_DIRECTORY
         d.setVar('PACKAGES', "%s %s" % (pn_lic, packages))
         d.setVar('FILES_' + pn_lic, files)
+    for pn in packages.split():
+        if pn == pn_lic:
+            continue
         rrecommends_pn = d.getVar('RRECOMMENDS_' + pn)
         if rrecommends_pn:
             d.setVar('RRECOMMENDS_' + pn, "%s %s" % (pn_lic, rrecommends_pn))