handle derived work

This commit is contained in:
Sébastien Loriot
2020-11-02 18:07:39 +01:00
parent a49e2bc6cd
commit b5094bd00a
+5 -1
View File
@@ -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";
}