diff options
author | Don Garrett <dgarrett@google.com> | 2014-07-15 17:22:24 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-07-18 04:42:50 +0000 |
commit | 9aec4f4faa9b63e7ed92dd0a7218ced86c89c36f (patch) | |
tree | 5436de024a510b2d95904d0d08f14169a0319de8 /licensing | |
parent | 15099cde8e63dbaaee355746e16a7174c54f2a42 (diff) | |
download | chromite-9aec4f4faa9b63e7ed92dd0a7218ced86c89c36f.tar.gz |
license: Add ability to skip license: 'Proprietary-Binary'
Some packages contain proprietary binary blobs for which we have no
requirement to list license information.
Add a new license value for they can be used to be skipped (without
error) by the licensing process.
Adjusted ebuild verification code to ignore SKIPPED_LICENSES.
BUG=chromium:386758
TEST=pytlint + tryjob with peach_pit exynos-pre-boot using new license.
repo uploaded an ebuild which uses a SKIPPED_LICENSE.
Change-Id: I769411cc40943116be52e429d6bd569b04116b09
Reviewed-on: https://chromium-review.googlesource.com/208242
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Don Garrett <dgarrett@chromium.org>
Diffstat (limited to 'licensing')
-rw-r--r-- | licensing/licenses.py | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/licensing/licenses.py b/licensing/licenses.py index 58630bf94..a754886f3 100644 --- a/licensing/licenses.py +++ b/licensing/licenses.py @@ -181,6 +181,18 @@ SKIPPED_PACKAGES = [ 'sys-kernel/chromeos-kernel', # already manually credit Linux ] +SKIPPED_LICENSES = [ + # Some of our packages contain binary blobs for which we have special + # negotiated licenses, and no need to display anything publicly. Strongly + # consider using Google-TOS instead, if possible. + 'Proprietary-Binary', + + # If you have an early repo for which license terms have yet to be decided + # use this. It will cause licensing for the package to be mostly ignored. + # Official should error for any package with this license. + 'TAINTED', # TODO(dgarrett): Error on official builds with this license. +] + LICENSE_NAMES_REGEX = [ r'^copyright$', r'^copyright[.]txt$', @@ -756,8 +768,14 @@ being scraped currently).""", self._FindEbuildPath() self._ReadEbuildMetadata() self.skip = self.skip or not self._TestEbuildContents() - if self.skip: - return + + # If this ebuild only uses skipped licenses, skip it. + if (self.ebuild_license_names and + all(l in SKIPPED_LICENSES for l in self.ebuild_license_names)): + self.skip = True + + if self.skip: + return if self.fullname in PACKAGE_HOMEPAGES: self.homepages = PACKAGE_HOMEPAGES[self.fullname] @@ -1059,6 +1077,9 @@ class Licensing(object): if os.path.exists(path): return "Custom" + if license_name in SKIPPED_LICENSES: + return "Custom" + raise AssertionError(""" license %s could not be found in %s If the license in the ebuild is correct, |