Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > a01aed98d9a498638352fda6bed0d9e6 > files > 1

rpmlint-1.5-6.fc18.src.rpm

diff -up rpmlint-1.5/MenuXDGCheck.py.desktopfix rpmlint-1.5/MenuXDGCheck.py
--- rpmlint-1.5/MenuXDGCheck.py.desktopfix	2013-10-09 19:33:21.067330420 -0400
+++ rpmlint-1.5/MenuXDGCheck.py	2013-10-09 19:33:50.422330861 -0400
@@ -41,14 +41,19 @@ class MenuXDGCheck(AbstractCheck.Abstrac
 
         self.cfp.read(f)
         binary = self.cfp.get('Desktop Entry','Exec').split(' ',1)[0]
-        found = False
-        for i in STANDARD_BIN_DIRS:
-            if os.path.exists(root + i + binary):
-                # no need to check if the binary is +x, rpmlint does it
-                # in another place
-                found = True
-        if not found and binary:
-            printWarning(pkg, 'desktopfile-without-binary', filename, binary)
+        if binary:
+            if binary.startswith('/'):
+                found = os.path.exists(root + binary)
+            else:
+                for i in STANDARD_BIN_DIRS:
+                    if os.path.exists(root + i + binary):
+                        # no need to check if the binary is +x, rpmlint does it
+                        # in another place
+                        found = True
+                        break
+            if not found:
+                printWarning(pkg, 'desktopfile-without-binary', filename,
+                             binary)
 
 check = MenuXDGCheck()