forked from pool/rpmlint
53 lines
1.6 KiB
Diff
53 lines
1.6 KiB
Diff
|
Index: Filter.py
|
||
|
===================================================================
|
||
|
--- Filter.py (Revision 1434)
|
||
|
+++ Filter.py (Arbeitskopie)
|
||
|
@@ -96,10 +96,6 @@ def _diag_compare(x,y):
|
||
|
|
||
|
|
||
|
def printAllReasons():
|
||
|
- threshold = badnessThreshold()
|
||
|
- if threshold < 0:
|
||
|
- return 0
|
||
|
-
|
||
|
global _badness_score, _diagnostic
|
||
|
_diagnostic.sort(_diag_compare)
|
||
|
last_reason=''
|
||
|
@@ -114,8 +110,6 @@ def printAllReasons():
|
||
|
if Config.info and len(last_reason):
|
||
|
printDescriptions(last_reason)
|
||
|
_diagnostic = list()
|
||
|
- return _badness_score > threshold
|
||
|
-
|
||
|
|
||
|
_details={}
|
||
|
|
||
|
Index: rpmlint.py
|
||
|
===================================================================
|
||
|
--- rpmlint.py (Revision 1434)
|
||
|
+++ rpmlint.py (Arbeitskopie)
|
||
|
@@ -155,9 +155,7 @@ def main():
|
||
|
sys.stderr.write('Interrupted, exiting while scanning all packages\n')
|
||
|
sys.exit(2)
|
||
|
|
||
|
- if printAllReasons():
|
||
|
- sys.stderr.write('rpmlint: E: badness %d exceeds threshold %d, aborting.\n' % (badnessScore(), badnessThreshold()))
|
||
|
- sys.exit(66)
|
||
|
+ printAllReasons()
|
||
|
|
||
|
finally:
|
||
|
pkg and pkg.cleanup()
|
||
|
@@ -165,6 +163,12 @@ def main():
|
||
|
% (packages_checked, specfiles_checked,
|
||
|
printed_messages["E"], printed_messages["W"])
|
||
|
|
||
|
+ if (badnessThreshold() >= 0):
|
||
|
+ if badnessScore() >= badnessThreshold():
|
||
|
+ sys.stderr.write('rpmlint: E: badness %d exceeds threshold %d, aborting.\n' % (badnessScore(), badnessThreshold()))
|
||
|
+ sys.exit(66)
|
||
|
+ sys.exit(0)
|
||
|
+
|
||
|
if printed_messages["E"] > 0:
|
||
|
sys.exit(64)
|
||
|
elif printed_messages["W"] > 0:
|