rpmlint/rpmlint-1.5-desktopfix.patch
2013-10-09 19:44:45 -04:00

32 lines
1.3 KiB
Diff

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()