SHA256
1
0
forked from pool/rpmlint
rpmlint/detailed-desktop-file-check.diff

16 lines
605 B
Diff

--- MenuXDGCheck.py
+++ MenuXDGCheck.py
@@ -21,7 +21,11 @@
def check_file(self, pkg, filename):
f = pkg.dirName() + filename
- if getstatusoutput(('desktop-file-validate', f), 1)[0]:
+ st = getstatusoutput(('desktop-file-validate', f), 1)
+ if st[0]:
+ if st[1].find('error:') != -1:
+ printError(pkg, 'invalid-desktopfile', filename, st[1].split('error: ')[1])
+ else:
printError(pkg, 'invalid-desktopfile', filename)
if not is_utf8(f):
printError(pkg, 'non-utf8-desktopfile', filename)