forked from pool/rpmlint
OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=503
This commit is contained in:
parent
1ce530fa60
commit
2d2af816d1
@ -1,16 +1,43 @@
|
||||
diff --git a/Filter.py b/Filter.py
|
||||
index a728115..87b4009 100644
|
||||
--- a/Filter.py
|
||||
+++ b/Filter.py
|
||||
@@ -111,8 +111,9 @@ def printDescriptions(reason):
|
||||
@@ -43,15 +43,15 @@ else:
|
||||
|
||||
|
||||
def printInfo(pkg, reason, *details):
|
||||
- _print("I", pkg, reason, details)
|
||||
+ _print('I', pkg, reason, details)
|
||||
|
||||
|
||||
def printWarning(pkg, reason, *details):
|
||||
- _print("W", pkg, reason, details)
|
||||
+ _print('W', pkg, reason, details)
|
||||
|
||||
|
||||
def printError(pkg, reason, *details):
|
||||
- _print("E", pkg, reason, details)
|
||||
+ _print('E', pkg, reason, details)
|
||||
|
||||
|
||||
def _print(msgtype, pkg, reason, details):
|
||||
@@ -111,8 +111,10 @@ def printDescriptions(reason):
|
||||
|
||||
|
||||
def _diag_sortkey(x):
|
||||
- xs = x.split()
|
||||
- return (xs[2], xs[1])
|
||||
+ xs = x.split(maxsplit=2)
|
||||
+ # Primary Sort by Category: Info first, then Warnings, then Errors
|
||||
+ # ['game.x86_64:', 'W:', 'call-to-mktemp /usr/games/lib/blub\n']
|
||||
+ return (xs[2], xs[1], xs[0])
|
||||
+ return (xs[2], str('IWE'.find(xs[1][0])), xs[0])
|
||||
|
||||
|
||||
def printAllReasons():
|
||||
@@ -121,7 +123,7 @@ def printAllReasons():
|
||||
return False
|
||||
|
||||
global _diagnostic
|
||||
- _diagnostic.sort(key=_diag_sortkey, reverse=True)
|
||||
+ _diagnostic.sort(key=_diag_sortkey)
|
||||
last_reason = ''
|
||||
for diag in _diagnostic:
|
||||
if Config.info:
|
||||
|
Loading…
Reference in New Issue
Block a user