Louis-Philippe Véronneau pushed to branch master at lintian / lintian


Commits:
52e47fd6 by Maytham Alsudany at 2025-03-28T16:30:58+00:00
Remove "./" from d/copyright glob before testing if it matches anything

Closes: #1008479

- - - - -


3 changed files:

- lib/Lintian/Util.pm
- 
t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/debian/copyright
- + 
t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/folder/another-file


Changes:

=====================================
lib/Lintian/Util.pm
=====================================
@@ -400,6 +400,7 @@ purpose. No more directly having to access module variables 
either.
 
 sub match_glob {
     my ($glob, @things_to_test) = @_;
+    $glob =~ s{^\./}{}; # Normalize file path, remove leading "./"
     my $re = $rw->convert($glob);
 
     return grep { /^$re\z/ } @things_to_test;


=====================================
t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/debian/copyright
=====================================
@@ -41,3 +41,8 @@ Files: 
rare-filenames/01-file-with-(something-in-parenthesis).png
 Copyright: 2014, somebody1
 License: mylicense-5
  Fixme
+
+Files: ./folder/another-file
+Copyright: 2015, somebody1
+License: mylicense-6
+ Fixme


=====================================
t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/folder/another-file
=====================================



View it on GitLab: 
https://salsa.debian.org/lintian/lintian/-/commit/52e47fd69109bed942a9dc5cffd039948857badb

-- 
View it on GitLab: 
https://salsa.debian.org/lintian/lintian/-/commit/52e47fd69109bed942a9dc5cffd039948857badb
You're receiving this email because of your account on salsa.debian.org.


Reply via email to