SHA256
1
0
forked from pool/rpmlint
rpmlint/no-badness-return.diff
OBS User autobuild 773aa7d652 Accepting request 19018 from Base:System
Copy from Base:System/rpmlint based on submit request 19018 from user lnussel

OBS-URL: https://build.opensuse.org/request/show/19018
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=44
2009-08-28 20:12:54 +00:00

52 lines
1.6 KiB
Diff

Index: Filter.py
===================================================================
--- Filter.py.orig
+++ Filter.py
@@ -101,10 +101,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 = ''
@@ -119,8 +115,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.orig
+++ rpmlint.py
@@ -170,15 +170,19 @@ def main():
sys.stderr.write('(none): E: interrupted, exiting while scanning all packages\n')
sys.exit(2)
- if printAllReasons():
- sys.stderr.write('(none): E: badness %d exceeds threshold %d, aborting.\n' % (badnessScore(), badnessThreshold()))
- sys.exit(66)
+ printAllReasons()
finally:
print "%d packages and %d specfiles checked; %d errors, %d warnings." \
% (packages_checked, specfiles_checked,
printed_messages["E"], printed_messages["W"])
+ if (badnessThreshold() >= 0):
+ if badnessScore() >= badnessThreshold():
+ sys.stderr.write('(none): E: badness %d exceeds threshold %d, aborting.\n' % (badnessScore(), badnessThreshold()))
+ sys.exit(66)
+ sys.exit(0)
+
if printed_messages["E"] > 0:
sys.exit(64)
sys.exit(0)