From b5094bd00acbb0d737c79cb46bc4f4a664cd2ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 2 Nov 2020 18:07:39 +0100 Subject: [PATCH] handle derived work --- Scripts/developer_scripts/licensecheck | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Scripts/developer_scripts/licensecheck b/Scripts/developer_scripts/licensecheck index ce7a9c537d6..262aae9aef7 100755 --- a/Scripts/developer_scripts/licensecheck +++ b/Scripts/developer_scripts/licensecheck @@ -444,6 +444,10 @@ sub parselicense { $license = "GENERATED FILE"; } + if ($licensetext =~ /This file incorporates work covered by the following copyright and permission notice/i) { + $license = "DERIVED WORK"; + } + if ($licensetext =~ /((is free software.? )?you can redistribute (it|them) and\/or modify (it|them)|is licensed) under the terms of (version [^ ]+ of )?the (GNU (Library |Lesser )General Public License|LGPL)/i) { $license = "LGPL$gplver$extrainfo $license"; } @@ -576,7 +580,7 @@ sub parselicense { } # Since SPDX tags are sufficient, make sure no license notice was present - if (length($license)!=0 && $license ne "GENERATED FILE") + if (length($license)!=0 && $license ne "GENERATED FILE" && !($license =~ "DERIVED WORK")) { $license = $license." READ FROM LICENSE NOTICE THAT SHOULD NOT BE PRESENT"; }