Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP2
rpmlint.28630
accept-licenses-with-plus.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File accept-licenses-with-plus.patch of Package rpmlint.28630
Index: rpmlint-rpmlint-1.11/TagsCheck.py =================================================================== --- rpmlint-rpmlint-1.11.orig/TagsCheck.py +++ rpmlint-rpmlint-1.11/TagsCheck.py @@ -845,12 +845,19 @@ class TagsCheck(AbstractCheck.AbstractCh return (x.strip() for x in (l for l in license_regex.split(license) if l)) + def is_valid_license(license): + if license in VALID_LICENSES: + return True + if license.endswith('+'): + return license[:-1] in VALID_LICENSES + return False + rpm_license = pkg[rpm.RPMTAG_LICENSE] if not rpm_license: printError(pkg, 'no-license') else: valid_license = True - if rpm_license not in VALID_LICENSES: + if not is_valid_license(rpm_license): license_string = rpm_license l1, lexception = split_license_exception(rpm_license) @@ -862,10 +869,10 @@ class TagsCheck(AbstractCheck.AbstractCh valid_license = False for l1 in split_license(license_string): - if l1 in VALID_LICENSES: + if is_valid_license(l1): continue for l2 in split_license(l1): - if l2 not in VALID_LICENSES: + if not is_valid_license(l2): printWarning(pkg, 'invalid-license', l2) valid_license = False if not valid_license:
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor