Otherwise, the rebuild command does not print output until all the rebuilds for a whole staging are completed. With this change each package should be printed immediately.
18 lines
542 B
Python
18 lines
542 B
Python
from osc.core import get_request
|
|
from osclib.comments import CommentAPI
|
|
|
|
|
|
class RebuildCommand(object):
|
|
def __init__(self, api):
|
|
self.api = api
|
|
|
|
def perform(self, stagings=None, force=False):
|
|
if not stagings:
|
|
stagings = self.api.get_staging_projects_short()
|
|
|
|
for staging in stagings:
|
|
status = self.api.project_status(staging)
|
|
rebuilt = self.api.rebuild_broken(status, not force)
|
|
for key, code in rebuilt:
|
|
print('rebuild {} {}'.format(key, code))
|