cleanup_rings: print summary of packages to be dropped and commands last.

This commit is contained in:
Jimmy Berry
2017-04-25 19:29:04 -05:00
parent 39a4914e48
commit 4d0e98a00c

View File

@@ -11,6 +11,7 @@ class CleanupRings(object):
self.sources = set()
self.api = api
self.links = {}
self.commands = []
def perform(self):
for index, ring in enumerate(self.api.rings):
@@ -18,6 +19,8 @@ class CleanupRings(object):
ring_next = self.api.rings[index + 1] if index + 1 < len(self.api.rings) else None
self.check_depinfo_ring(ring, ring_next)
print('\n'.join(self.commands))
def find_inner_ring_links(self, prj):
query = {
'view': 'info',
@@ -144,6 +147,8 @@ class CleanupRings(object):
if source not in self.pkgdeps and source not in self.links:
if source.startswith('texlive-specs-'): # XXX: texlive bullshit packaging
continue
print('osc rdelete -m cleanup {} {}'.format(prj, source))
print('# - {}'.format(source))
self.commands.append('osc rdelete -m cleanup {} {}'.format(prj, source))
if nextprj:
print('osc linkpac {} {} {}').format(self.api.project, source, nextprj)
self.commands.append('osc linkpac {} {} {}'.format(self.api.project, source, nextprj))