improve missing debug info text again

This commit is contained in:
Ludwig Nussel 2015-06-08 16:23:50 +02:00
parent fa845d6237
commit 011e8b959f

View File

@ -122,13 +122,12 @@ class NotReadyYet(Exception):
class MissingDebugInfo(Exception): class MissingDebugInfo(Exception):
def __init__(self, missing_debuginfo): def __init__(self, missing_debuginfo):
Exception.__init__(self) Exception.__init__(self)
self.msg = 'debug information is missing for the following packages, can\'t check:\n<pre>' self.msg = ''
for i in missing_debuginfo: for i in missing_debuginfo:
if len(i) == 6: if len(i) == 6:
self.msg += "%s/%s %s/%s %s %s\n"%i self.msg += "%s/%s %s/%s %s %s\n"%i
elif len(i) == 5: elif len(i) == 5:
self.msg += "%s/%s %s/%s %s\n"%i self.msg += "%s/%s %s/%s %s\n"%i
self.msg += '</pre>\nplease enable debug info in your project config.\n'
def __str__(self): def __str__(self):
return self.msg return self.msg
@ -290,6 +289,8 @@ class ABIChecker(ReviewBot.ReviewBot):
overall = None overall = None
missing_debuginfo = []
for mr in myrepos: for mr in myrepos:
try: try:
dst_libs = self.extract(dst_project, dst_package, dst_srcinfo, mr.dstrepo, mr.arch) dst_libs = self.extract(dst_project, dst_package, dst_srcinfo, mr.dstrepo, mr.arch)
@ -302,7 +303,7 @@ class ABIChecker(ReviewBot.ReviewBot):
ret = None ret = None
continue continue
except MissingDebugInfo, e: except MissingDebugInfo, e:
self.text_summary += str(e) + "\n" missing_debuginfo.append(str(e))
ret = False ret = False
continue continue
except FetchError, e: except FetchError, e:
@ -323,7 +324,7 @@ class ABIChecker(ReviewBot.ReviewBot):
ret = None ret = None
continue continue
except MissingDebugInfo, e: except MissingDebugInfo, e:
self.text_summary += str(e) + "\n" missing_debuginfo.append(str(e))
ret = False ret = False
continue continue
except FetchError, e: except FetchError, e:
@ -401,6 +402,11 @@ class ABIChecker(ReviewBot.ReviewBot):
cleanup() cleanup()
if missing_debuginfo:
self.text_summary += 'debug information is missing for the following packages, can\'t check:\n<pre>'
self.text_summary += ''.join(missing_debuginfo)
self.text_summary += '</pre>\nplease enable debug info in your project config.\n'
self.reports.append(report._replace(result = overall, reports = libresults)) self.reports.append(report._replace(result = overall, reports = libresults))
# upload reports # upload reports