Fix for all repos data

This commit is contained in:
Dimitris Zlatanidis 2024-03-17 23:14:36 +02:00
parent ebf211e185
commit 30a6412115

View file

@ -81,10 +81,19 @@ class Choose(Configs):
def choose_for_others(self, data: dict, packages: list):
""" Choose packages for others methods like install, tracking etc. """
for pkg in packages:
for package in data.keys():
if self.repository == '*':
for pkg in packages:
for name, repo in data.items():
for package in repo.keys():
if pkg in package or pkg == '*':
version: str = repo[package]['version']
self.choices.extend([(package, version, False, f'Package: {package}-{version} '
f'> {name}')])
if pkg in package or pkg == '*':
version: str = data[package]['version']
self.choices.extend([(package, version, False, f'Package: {package}-{version} '
f'> {self.repository}')])
else:
for pkg in packages:
for package in data.keys():
if pkg in package or pkg == '*':
version: str = data[package]['version']
self.choices.extend([(package, version, False, f'Package: {package}-{version} '
f'> {self.repository}')])