SHA256
1
0
forked from pool/rpmlint
rpmlint/detailed-desktop-file-check.diff
OBS User autobuild eaf5a8d432 Accepting request 20532 from Base:System
Copy from Base:System/rpmlint based on submit request 20532 from user dirkmueller

OBS-URL: https://build.opensuse.org/request/show/20532
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=46
2009-09-16 16:41:21 +00:00

18 lines
703 B
Diff

--- MenuXDGCheck.py
+++ MenuXDGCheck.py
@@ -21,8 +21,12 @@
def check_file(self, pkg, filename):
f = pkg.dirName() + filename
- if getstatusoutput(('desktop-file-validate', f), True)[0]:
- printError(pkg, 'invalid-desktopfile', filename)
+ st = getstatusoutput(('desktop-file-validate', f), True)
+ 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)