* [PATCH 0/1] archiver.bbclass: Reduce some duplication for function get_licenses
@ 2012-06-07 2:01 xiaofeng.yan
2012-06-07 2:01 ` [PATCH 1/1] " xiaofeng.yan
2012-06-12 18:07 ` [PATCH 0/1] " Saul Wold
0 siblings, 2 replies; 3+ messages in thread
From: xiaofeng.yan @ 2012-06-07 2:01 UTC (permalink / raw)
To: openembedded-core
From: Xiaofeng Yan <xiaofeng.yan@windriver.com>
The content to modify this bbclass is as follow:
- Use the existing functions to get license as a directory instead of
rewriting it for avoiding code duplication.
- Use SPDXLICENSEMAP to map licenses
The following changes since commit df8f55a919b3cc602ce1f1c51630c7edf6e36b55:
Cristian Iorga (1):
ltp: Add patch to correct failing build
are available in the git repository at:
git://git.pokylinux.org/poky-contrib xiaofeng/2473
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=xiaofeng/2473
Xiaofeng Yan (1):
archiver.bbclass: Reduce some duplication for function get_licenses
meta/classes/archiver.bbclass | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] archiver.bbclass: Reduce some duplication for function get_licenses
2012-06-07 2:01 [PATCH 0/1] archiver.bbclass: Reduce some duplication for function get_licenses xiaofeng.yan
@ 2012-06-07 2:01 ` xiaofeng.yan
2012-06-12 18:07 ` [PATCH 0/1] " Saul Wold
1 sibling, 0 replies; 3+ messages in thread
From: xiaofeng.yan @ 2012-06-07 2:01 UTC (permalink / raw)
To: openembedded-core
From: Xiaofeng Yan <xiaofeng.yan@windriver.com>
The content to modify this bbclass is as follow:
- Use the existing functions to get license as a directory instead of
rewriting it for avoiding code duplication.
- Use SPDXLICENSEMAP to map licenses
[YOCTO #2473]
Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
meta/classes/archiver.bbclass | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index ed2dbe4..083bb1d 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -225,17 +225,18 @@ def archive_logs(d,logdir,bbinc=False):
def get_licenses(d):
'''get licenses for running .bb file'''
- licenses = d.getVar('LICENSE', 1).replace('&', '|')
- licenses = licenses.replace('(', '').replace(')', '')
- clean_licenses = ""
- for x in licenses.split():
- if x.strip() == '' or x == 'CLOSED':
- continue
- if x != "|":
- clean_licenses += x
- if '|' in clean_licenses:
- clean_licenses = clean_licenses.replace('|','')
- return clean_licenses
+ import oe.license
+
+ licenses_type = d.getVar('LICENSE', True) or ""
+ lics = oe.license.is_included(licenses_type)[1:][0]
+ lice = ''
+ for lic in lics:
+ licens = d.getVarFlag('SPDXLICENSEMAP', lic)
+ if licens != None:
+ lice += licens
+ else:
+ lice += lic
+ return lice
def move_tarball_deploy(d,tarball_list):
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 0/1] archiver.bbclass: Reduce some duplication for function get_licenses
2012-06-07 2:01 [PATCH 0/1] archiver.bbclass: Reduce some duplication for function get_licenses xiaofeng.yan
2012-06-07 2:01 ` [PATCH 1/1] " xiaofeng.yan
@ 2012-06-12 18:07 ` Saul Wold
1 sibling, 0 replies; 3+ messages in thread
From: Saul Wold @ 2012-06-12 18:07 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On 06/06/2012 07:01 PM, xiaofeng.yan@windriver.com wrote:
> From: Xiaofeng Yan<xiaofeng.yan@windriver.com>
>
> The content to modify this bbclass is as follow:
> - Use the existing functions to get license as a directory instead of
> rewriting it for avoiding code duplication.
> - Use SPDXLICENSEMAP to map licenses
>
> The following changes since commit df8f55a919b3cc602ce1f1c51630c7edf6e36b55:
> Cristian Iorga (1):
> ltp: Add patch to correct failing build
>
> are available in the git repository at:
>
> git://git.pokylinux.org/poky-contrib xiaofeng/2473
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=xiaofeng/2473
>
> Xiaofeng Yan (1):
> archiver.bbclass: Reduce some duplication for function get_licenses
>
> meta/classes/archiver.bbclass | 23 ++++++++++++-----------
> 1 files changed, 12 insertions(+), 11 deletions(-)
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
Merged into OE-Core
Thanks
Sau!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-12 18:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-07 2:01 [PATCH 0/1] archiver.bbclass: Reduce some duplication for function get_licenses xiaofeng.yan
2012-06-07 2:01 ` [PATCH 1/1] " xiaofeng.yan
2012-06-12 18:07 ` [PATCH 0/1] " Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox