diff options
author | 2019-10-08 12:04:04 +0300 | |
---|---|---|
committer | 2019-10-11 23:04:40 +0200 | |
commit | 143f135833a94e973d5921a09b9791f8aa008d40 (patch) | |
tree | d44b704c4a171ad13d6924462bceedb3f5748796 /utils | |
parent | 67cfae0f2650c48d3d2c3761828e9cd7d3bd3895 (diff) | |
download | buildroot-143f135833a94e973d5921a09b9791f8aa008d40.tar.gz buildroot-143f135833a94e973d5921a09b9791f8aa008d40.tar.bz2 |
scanpypi: write every license file once
On some cases, when the package contains multiple license files
and some of them from the same type, the scanpypi script will write
the same license type more than once under _LICENSE.
Hence, before creating the _LICENSE variable, we'll remove every
possible duplication.
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/scanpypi | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/scanpypi b/utils/scanpypi index 55b3d1e61c..b48eda49aa 100755 --- a/utils/scanpypi +++ b/utils/scanpypi @@ -461,6 +461,7 @@ class BuildrootPackage(): ' likely wrong, please change it if need be'.format( license=', '.join(licenses))) licenses = [self.metadata['info']['license']] + licenses = set(licenses) license_line = '{name}_LICENSE = {license}\n'.format( name=self.mk_name, license=', '.join(licenses)) @@ -473,6 +474,7 @@ class BuildrootPackage(): license_names.append(match.license.id) else: license_names.append("FIXME: license id couldn't be detected") + license_names = set(license_names) if len(license_names) > 0: license_line = ('{name}_LICENSE =' |