[devscripts] 01/01: licensecheck: fixed regexp used to parse mime information

dod at debian.org dod at debian.org
Fri Jul 10 07:08:33 UTC 2015


This is an automated email from the git hooks/post-receive script.

dod pushed a commit to branch master
in repository devscripts.

commit bdad2899b9ed710aaccf6e97ff35468f9ad43ada
Author: Dominique Dumont <dod at debian.org>
Date:   Fri Jul 10 09:08:24 2015 +0200

    licensecheck: fixed regexp used to parse mime information
    
    The regexp needs to accept mime types application/xml and text/x-c.
    
    This is part of the fix for #791756. I forgot to run the tests. Sorry
    about that.
    
    Gbp-Dch: Ignore
---
 scripts/licensecheck.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/licensecheck.pl b/scripts/licensecheck.pl
index 7ed9075..2a86e9e 100755
--- a/scripts/licensecheck.pl
+++ b/scripts/licensecheck.pl
@@ -323,7 +323,7 @@ while (@files) {
     # Encode::Guess does not work well, use good old file command to get file encoding
     my $mime = `file --brief --mime --dereference $file`;
     my $charset ;
-    if ($mime =~ m!text/\w+; charset=([\w-]+)!) {
+    if ($mime =~ m!(?:text/[\w-]+|application/xml); charset=([\w-]+)!) {
 	$charset = $1;
     }
     else {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list