diff options
Diffstat (limited to 'bitbake/lib/bb/progress.py')
-rw-r--r-- | bitbake/lib/bb/progress.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bitbake/lib/bb/progress.py b/bitbake/lib/bb/progress.py index d051ba0198..9518be77fb 100644 --- a/bitbake/lib/bb/progress.py +++ b/bitbake/lib/bb/progress.py | |||
@@ -94,12 +94,15 @@ class LineFilterProgressHandler(ProgressHandler): | |||
94 | while True: | 94 | while True: |
95 | breakpos = self._linebuffer.find('\n') + 1 | 95 | breakpos = self._linebuffer.find('\n') + 1 |
96 | if breakpos == 0: | 96 | if breakpos == 0: |
97 | break | 97 | # for the case when the line with progress ends with only '\r' |
98 | breakpos = self._linebuffer.find('\r') + 1 | ||
99 | if breakpos == 0: | ||
100 | break | ||
98 | line = self._linebuffer[:breakpos] | 101 | line = self._linebuffer[:breakpos] |
99 | self._linebuffer = self._linebuffer[breakpos:] | 102 | self._linebuffer = self._linebuffer[breakpos:] |
100 | # Drop any line feeds and anything that precedes them | 103 | # Drop any line feeds and anything that precedes them |
101 | lbreakpos = line.rfind('\r') + 1 | 104 | lbreakpos = line.rfind('\r') + 1 |
102 | if lbreakpos: | 105 | if lbreakpos and lbreakpos != breakpos: |
103 | line = line[lbreakpos:] | 106 | line = line[lbreakpos:] |
104 | if self.writeline(filter_color(line)): | 107 | if self.writeline(filter_color(line)): |
105 | super().write(line) | 108 | super().write(line) |
@@ -145,7 +148,7 @@ class MultiStageProgressReporter: | |||
145 | for tasks made up of python code spread across multiple | 148 | for tasks made up of python code spread across multiple |
146 | classes / functions - the progress reporter object can | 149 | classes / functions - the progress reporter object can |
147 | be passed around or stored at the object level and calls | 150 | be passed around or stored at the object level and calls |
148 | to next_stage() and update() made whereever needed. | 151 | to next_stage() and update() made wherever needed. |
149 | """ | 152 | """ |
150 | def __init__(self, d, stage_weights, debug=False): | 153 | def __init__(self, d, stage_weights, debug=False): |
151 | """ | 154 | """ |