Skip to contentSkip to conversation

utils/scancpan: improve license file detection

PATCH New Francois Perrad 2 participants 2 messages Sep 16, 2019 – Sep 17, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 utils/scancpan: improve license file detection

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

---
 utils/scancpan | 1 +
 1 file changed, 1 insertion(+)
utils/scancpan +1 -0
index 1fccc980a..484ccaca9 100755
@@ -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) {
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 utils/scancpan: improve license file detection

Quoted 8 lines · On Mon, 16 Sep 2019 21:04:34 +0200 Francois Perrad <[email protected]> wrote:

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

---
 utils/scancpan | 1 +
 1 file changed, 1 insertion(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com