Skip to content

Commit

Permalink
Builder: Ignore some benign warnings in build reports
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jul 17, 2013
1 parent 3cf688c commit 0999143
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions distrib/builder/utils.py
Expand Up @@ -125,18 +125,22 @@ def aptrepo_find_latest_tag():


def count_log_word(fn, word):
txt = unicode(gzip.open(fn).read(), 'latin1').lower()
pos = 0
count = 0
while True:
pos = txt.find(unicode(word), pos)
if pos < 0: break
if txt[pos-1] not in '/\\_'+string.ascii_letters and \
txt[pos+len(word)] not in 's.' and \
txt[pos-11:pos] != 'shlibdeps: ' and txt[pos-12:pos] != 'genchanges: ' and \
txt[pos-12:pos] != 'cc1objplus: ':
count += 1
pos += len(word)
#txt = unicode(gzip.open(fn).read(), 'latin1').lower()
for txt in [unicode(rl, 'latin1').lower() for rl in string.split(gzip.open(fn).read(), '\n')]:
pos = txt.find(unicode(word))
if pos < 0: continue
# Ignore some unnecessary gcc messages.
if 'should be explicitly initialized in the copy constructor' in txt: continue
if 'deprecated' in txt: continue
try:
if txt[pos-1] not in '/\\_'+string.ascii_letters and \
txt[pos+len(word)] not in 's.' and \
txt[pos-11:pos] != 'shlibdeps: ' and txt[pos-12:pos] != 'genchanges: ' and \
txt[pos-12:pos] != 'cc1objplus: ':
count += 1
except IndexError:
count += 1
return count


Expand Down

0 comments on commit 0999143

Please sign in to comment.