Bug 1143510 - Fix line numbers for removal errors during make package. r=gps

This commit is contained in:
Mike Hommey 2015-03-16 08:18:39 +09:00
Родитель 7182517af9
Коммит d44ec111ff
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -179,6 +179,8 @@ class RemovedFiles(GeneratedFile):
def handle_line(self, str):
f = str.strip()
if not f:
return
if self.copier.contains(f):
errors.error('Removal of packaged file(s): %s' % f)
self.content += f + '\n'
@ -344,8 +346,7 @@ def main():
sink.close(args.manifest is not None)
if args.removals:
lines = [l.lstrip() for l in open(args.removals).readlines()]
removals_in = StringIO(''.join(lines))
removals_in = StringIO(open(args.removals).read())
removals_in.name = args.removals
removals = RemovedFiles(copier)
preprocess(removals_in, removals, defines)