[Buildroot] [git commit] utils/scancpan: improve license file detection

Thomas Petazzoni thomas.petazzoni at bootlin.com
Tue Sep 17 20:51:01 UTC 2019


commit: https://git.buildroot.net/buildroot/commit/?id=f71f944fe61b3671d1e72b3f6aaae5b238446eaa
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

MANIFEST may contains line like this:
"LICENSE                     LICENSE file (added by Distar)"
so, retains only the first word.

Signed-off-by: Francois Perrad <francois.perrad at gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
 utils/scancpan | 1 +
 1 file changed, 1 insertion(+)

diff --git a/utils/scancpan b/utils/scancpan
index 1fccc980af..484ccaca95 100755
--- a/utils/scancpan
+++ b/utils/scancpan
@@ -566,6 +566,7 @@ sub find_license_files {
     my @license_files;
     foreach (split /\n/, $manifest) {
         next if m|/|;
+        s|\s+.*$||;
         push @license_files, $_ if m/(ARTISTIC|COPYING|COPYRIGHT|LICENSE)/i;
     }
     if (scalar @license_files == 0 && $manifest =~ m/(README)[\n\s]/i) {


More information about the buildroot mailing list