cleanup_rings.py: Fix links handling

A dict mapping linked package to linking package won't work, there are multiple
linking packages which previously overwrote each other. Turn it around.
This commit is contained in:
Fabian Vogt 2023-03-23 15:43:02 +01:00
parent 4a241c4b09
commit 8a3389e4ac

View File

@ -61,7 +61,7 @@ class CleanupRings(object):
if dprj != self.api.project:
if not dprj.startswith(self.api.crings):
print("#{} not linking to base {} but {}".format(pkg, self.api.project, dprj))
self.links[dpkg] = pkg
self.links[pkg] = dpkg
# multi spec package must link to ring
elif len(links) > 1:
mainpkg = links[1].get('package')
@ -78,7 +78,7 @@ class CleanupRings(object):
else:
if pkg != 'glibc.i686': # FIXME: ugly exception
print("osc linkpac -f {}/{} {}/{}".format(destring, mainpkg, prj, pkg))
self.links[mainpkg] = pkg
self.links[pkg] = mainpkg
def fill_pkgdeps(self, prj, repo, arch):
root = builddepinfo(self.api.apiurl, prj, repo, arch)