Bug#697916: lintian: Add a check for menu referencing icon by relative path
Package: lintian
Version: 2.5.10.3
Severity: wishlist
Tags: patch upstream
Dear Maintainer,
Please add a check to test for menu file referencing icon by relative
path instead of absolute path, as discussed in #693477. Attached to
this bug report is a patch to implement this.
Best regards.
-- System Information:
Debian Release: 7.0
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'stable-updates'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages lintian depends on:
ii binutils 2.22-7.1
ii bzip2 1.0.6-4
ii diffstat 1.55-3
ii file 5.11-2
ii gettext 0.18.1.1-10
ii hardening-includes 2.3
ii intltool-debian 0.35.0+20060710.1
ii libapt-pkg-perl 0.1.26+b1
ii libarchive-zip-perl 1.30-6
ii libc-bin 2.13-38
ii libclass-accessor-perl 0.34-1
ii libclone-perl 0.31-1+b2
ii libdpkg-perl 1.16.9
ii libemail-valid-perl 0.190-1
ii libipc-run-perl 0.92-1
ii libparse-debianchangelog-perl 1.2.0-1
ii libtimedate-perl 1.2000-1
ii liburi-perl 1.60-1
ii locales 2.13-38
ii man-db 2.6.3-3
ii patchutils 0.3.2-1.1
ii perl [libdigest-sha-perl] 5.14.2-16
lintian recommends no packages.
Versions of packages lintian suggests:
pn binutils-multiarch <none>
ii dpkg-dev 1.16.9
ii libhtml-parser-perl 3.69-2
pn libperlio-gzip-perl <none>
ii libtext-template-perl 1.45-2
ii lzma 9.22-2
ii man-db 2.6.3-3
ii xz-utils [lzma] 5.1.1alpha+20120614-2
-- no debconf information
diff --git a/checks/menu-format b/checks/menu-format
index a1447b9..666321d 100644
--- a/checks/menu-format
+++ b/checks/menu-format
@@ -525,6 +525,10 @@ sub VerifyIcon {
return;
}
+ if ($icon =~ m,^[^/],) {
+ tag 'mime-file-use-relative-icon-path', $icon;
+ }
+
$icon =~ s|^/*||og;
if (not ($icon =~ m/\.xpm$/i)) {
diff --git a/checks/menu-format.desc b/checks/menu-format.desc
index 495cfec..0230c31 100644
--- a/checks/menu-format.desc
+++ b/checks/menu-format.desc
@@ -130,6 +130,13 @@ Certainty: certain
Info: Icons in the Debian menu system should be in XPM format.
Ref: menu 3.7
+Tag: mime-file-use-relative-icon-path
+Severity: normal
+Certainty: certain
+Info: This package contains a menu file which reference an icon by a relative
+ path. However, icon should be referenced by an absolute path in menu files.
+Ref: menu 3.2
+
Tag: menu-icon-missing
Severity: normal
Certainty: possible
Reply to: