Patchwork license: fix LICENSE_CREATE_PACKAGE to stay disabled by default

login
register
mail settings
Submitter Martin Jansa
Date Jan. 29, 2013, 12:37 p.m.
Message ID <1359463060-12321-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/43637/
State Accepted, archived
Headers show

Comments

Martin Jansa - Jan. 29, 2013, 12:37 p.m.
* as reported by Enrico on #oe
  11:06:50 < ensc|w> JaMa: might this be caused by dc78ef91a2bf01efb8028c9afbe69e506e016265
  which checks for 'd.getVar('LICENSE_CREATE_PACKAGE', True)' evaluating to 'True' for every
  string (including the default 0)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/license.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Otavio Salvador - Jan. 29, 2013, 12:57 p.m.
On Tue, Jan 29, 2013 at 10:37 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
> * as reported by Enrico on #oe
>   11:06:50 < ensc|w> JaMa: might this be caused by dc78ef91a2bf01efb8028c9afbe69e506e016265
>   which checks for 'd.getVar('LICENSE_CREATE_PACKAGE', True)' evaluating to 'True' for every
>   string (including the default 0)
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  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 d4ebb26..9f38221 100644
> --- a/meta/classes/license.bbclass
> +++ b/meta/classes/license.bbclass
> @@ -103,7 +103,7 @@ python do_populate_lic() {
>  # it would be better to copy them in do_install_append, but find_license_filesa is python
>  python perform_packagecopy_prepend () {
>      enabled = d.getVar('LICENSE_CREATE_PACKAGE', True)
> -    if d.getVar('CLASSOVERRIDE', True) == 'class-target' and enabled:
> +    if d.getVar('CLASSOVERRIDE', True) == 'class-target' and enabled and enabled == "1":
>          lic_files_paths = find_license_files(d)

Uh?!? ... and enabled and enabled == "1"? You can drop the first no?

>          # LICENSE_FILES_DIRECTORY starts with '/' so os.path.join cannot be used to join D and LICENSE_FILES_DIRECTORY
> --
> 1.8.1.2
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

Patch

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index d4ebb26..9f38221 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -103,7 +103,7 @@  python do_populate_lic() {
 # it would be better to copy them in do_install_append, but find_license_filesa is python
 python perform_packagecopy_prepend () {
     enabled = d.getVar('LICENSE_CREATE_PACKAGE', True)
-    if d.getVar('CLASSOVERRIDE', True) == 'class-target' and enabled:
+    if d.getVar('CLASSOVERRIDE', True) == 'class-target' and enabled and enabled == "1":
         lic_files_paths = find_license_files(d)
 
         # LICENSE_FILES_DIRECTORY starts with '/' so os.path.join cannot be used to join D and LICENSE_FILES_DIRECTORY