[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#697916: lintian: Add a check for menu referencing icon by relative path



Le vendredi 11 janvier 2013 13:47:55, vous avez écrit :
> On Fri, 2013-01-11 at 12:08:48 +0100, Thomas Preud'homme wrote:
> > Package: lintian
> > Version: 2.5.10.3
> > Severity: wishlist
> > Tags: patch upstream
> > 
> > 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
> 
> Shouldn't this be 'menu-...'? Maybe a better name would be:
> 
> Tag: mime-icon-uses-relative-path

err, I don't know how I made this mistake. I was sure I wrote menu.

> 
> > +Severity: normal
> > +Certainty: certain
> > +Info: This package contains a menu file which reference an icon by a
> > relative
> 
> references

Ok.

> 
> > + 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
> 
> Thanks,
> Guillem

Updated,

Cheers.
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 'menu-icon-uses-relative-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: menu-icon-uses-relative-path
+Severity: normal
+Certainty: certain
+Info: This package contains a menu file which references 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

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: