diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2015-11-30 19:09:09 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2015-12-01 09:41:02 +0100 |
commit | c9b5fbb58ddde97cba698ca865e495639238c246 (patch) | |
tree | 54c407a9ced60bb0bafdace7414df620af2c90ca /scripts | |
parent | 7545e40b7e80f2996bf0329cb2246d9ba33a77d1 (diff) | |
download | ptxdist-c9b5fbb58ddde97cba698ca865e495639238c246.tar.gz ptxdist-c9b5fbb58ddde97cba698ca865e495639238c246.tar.xz |
license: handle SPDX composite license expressions
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/ptxd_make_license_report.sh | 6 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_world_license.sh | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/scripts/lib/ptxd_make_license_report.sh b/scripts/lib/ptxd_make_license_report.sh index d2083df91..04c2e233b 100644 --- a/scripts/lib/ptxd_make_license_report.sh +++ b/scripts/lib/ptxd_make_license_report.sh @@ -34,6 +34,7 @@ ptxd_make_license_report_header() { \licensereporttrue \makeindex[name=attribution,intoc,title=attribution Package Index] + \makeindex[name=choice,intoc,title=choice Package Index] \makeindex[name=nosource,intoc,title=nosource Package Index] \makeindex[name=nopatches,intoc,title=nopatches Package Index] @@ -96,8 +97,13 @@ ptxd_make_license_report_footer() { Packages marked with the {\it attribution} flag require some sort of attribution. Please refer to the package license for further details. + \section{choice\label{choice}} + Packages marked with the {\it choice} flag require the licensee to + make some kind of license choice. Please refer to the package + license for further details. \printindex[attribution] + \printindex[choice] \printindex[nosource] \printindex[nopatches] diff --git a/scripts/lib/ptxd_make_world_license.sh b/scripts/lib/ptxd_make_world_license.sh index a6743c134..ccfaf51d4 100644 --- a/scripts/lib/ptxd_make_world_license.sh +++ b/scripts/lib/ptxd_make_world_license.sh @@ -284,7 +284,7 @@ ptxd_create_section_from_license() { local -A section local orig_IFS="${IFS}" - IFS=$', ' + IFS=$'(), ' for license in ${1}; do local osi="false" @@ -313,6 +313,8 @@ ptxd_create_section_from_license() echo ignore return 0 ;; + AND|OR|WITH|"") + ;; *) section[other]="true" ;; @@ -346,7 +348,7 @@ export -f ptxd_make_world_license_add_flag ptxd_make_world_license_flags() { local orig_IFS="${IFS}" - IFS=$', ' + IFS=$'(), ' for license in ${pkg_license}; do case "${license}" in @@ -360,6 +362,9 @@ ptxd_make_world_license_flags() { nosource|nopatches|attribution) ptxd_make_world_license_add_flag "${license}" ;; + OR) + ptxd_make_world_license_add_flag choice + ;; esac done |