mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Support multiple licenses
This commit is contained in:
parent
ce36805ad5
commit
809232f8b3
1 changed files with 15 additions and 10 deletions
|
@ -881,19 +881,24 @@ class Manifest(TestSuite):
|
||||||
if "license" not in self.manifest:
|
if "license" not in self.manifest:
|
||||||
return
|
return
|
||||||
|
|
||||||
license = self.manifest["license"]
|
# Turns out there may be multiple licenses ... (c.f. seafile)
|
||||||
|
licenses = self.manifest["license"].split(",")
|
||||||
|
|
||||||
if "nonfree" in license.replace("-", ""):
|
for license in licenses:
|
||||||
yield Warning("'non-free' apps cannot be integrated in YunoHost's app catalog.")
|
|
||||||
return
|
|
||||||
|
|
||||||
code_license = '<code property="spdx:licenseId">' + license + '</code>'
|
license = license.strip()
|
||||||
|
|
||||||
if code_license not in spdx_licenses():
|
if "nonfree" in license.replace("-", ""):
|
||||||
yield Warning(
|
yield Warning("'non-free' apps cannot be integrated in YunoHost's app catalog.")
|
||||||
"The license id '%s' is not registered in https://spdx.org/licenses/." % license
|
return
|
||||||
)
|
|
||||||
return
|
code_license = '<code property="spdx:licenseId">' + license + '</code>'
|
||||||
|
|
||||||
|
if code_license not in spdx_licenses():
|
||||||
|
yield Warning(
|
||||||
|
"The license id '%s' is not registered in https://spdx.org/licenses/." % license
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
@test()
|
@test()
|
||||||
def description(self):
|
def description(self):
|
||||||
|
|
Loading…
Reference in a new issue