Bug#760677: lintian: Bad regex causes desktop-mime-but-no-exec-code to emit many false positives
Package: lintian
Version: 2.5.26
Severity: normal
Tags: patch
There's an extraneous / in the regex after the match for the actual exec
code. This will likely cause every correct desktop file to emit a false
positive.
Looking at the existing packages that have been flagged, they're nearly
all incorrect:
epiphany-browser: http://sources.debian.net/src/epiphany-browser/3.13.90-1/data/epiphany.desktop.in.in/#L7
ftools-fv: valid
mupen64plus-ui-console: http://sources.debian.net/src/mupen64plus-ui-console/2.0%2B18%2Bgfb21340-1/data/mupen64plus.desktop/#L7
parley: http://sources.debian.net/src/parley/4:4.14.0-2/src/parley.desktop/#L58
pentobi: http://sources.debian.net/src/pentobi/8.2-1/data/pentobi.desktop.in/#L8
pitivi: http://sources.debian.net/src/pitivi/0.93-4/data/pitivi.desktop.in/#L6
scid: http://sources.debian.net/src/scid/1:4.5.1.cvs20140429-2/debian/scid.desktop/#L8
tribler: http://sources.debian.net/src/tribler/6.3.1%2Bgit20140902.9a5a2604-1/Tribler/Main/Build/Ubuntu/tribler.desktop/#L4
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.14-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages lintian depends on:
ii binutils 2.24.51.20140903-1
ii bzip2 1.0.6-7
ii diffstat 1.58-1
ii file 1:5.19-1
ii gettext 0.19.2-2
ii hardening-includes 2.5+nmu1
ii intltool-debian 0.35.0+20060710.1
ii libapt-pkg-perl 0.1.29+b2
ii libarchive-zip-perl 1.38-1
ii libclass-accessor-perl 0.34-1
ii libclone-perl 0.37-1+b1
ii libdpkg-perl 1.17.13
ii libemail-valid-perl 1.194-1
ii libfile-basedir-perl 0.03-1
ii libipc-run-perl 0.92-1
ii liblist-moreutils-perl 0.33-2+b1
ii libparse-debianchangelog-perl 1.2.0-1
ii libtext-levenshtein-perl 0.09-1
ii libtimedate-perl 2.3000-2
ii liburi-perl 1.64-1
ii man-db 2.6.7.1-1
ii patchutils 0.3.3-1
ii perl [libdigest-sha-perl] 5.20.0-6
ii t1utils 1.37-2.1
Versions of packages lintian recommends:
ii libautodie-perl 2.25-1
ii libperlio-gzip-perl 0.18-3+b1
ii perl 5.20.0-6
ii perl-modules [libautodie-perl] 5.20.0-6
Versions of packages lintian suggests:
pn binutils-multiarch <none>
ii dpkg-dev 1.17.13
ii libhtml-parser-perl 3.71-1+b2
ii libtext-template-perl 1.46-1
ii libyaml-perl 1.09-1
ii xz-utils 5.1.1alpha+20120614-2
-- no debconf information
>From d355a440c53c18e2b1c739466584990d1a9df751 Mon Sep 17 00:00:00 2001
From: James McCoy <jamessan@debian.org>
Date: Sat, 6 Sep 2014 14:45:28 -0400
Subject: [PATCH] Fix false positives for desktop-mime-but-no-exec-code
Signed-off-by: James McCoy <jamessan@debian.org>
---
checks/menu-format.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/checks/menu-format.pm b/checks/menu-format.pm
index de7f9e6..c2898e6 100644
--- a/checks/menu-format.pm
+++ b/checks/menu-format.pm
@@ -705,7 +705,7 @@ sub verify_desktop_file {
# tags are present.
if ($file =~ m,^usr/share/applications/, and defined $vals{'MimeType'}) {
unless(defined $vals{'Exec'}
- and $vals{'Exec'} =~ m,(?:^|[^%])%[fFuU]/,){
+ and $vals{'Exec'} =~ m,(?:^|[^%])%[fFuU],){
tag 'desktop-mime-but-no-exec-code', $file;
}
}
--
2.1.0
Reply to: