Browse Source

iterate repository architectures

f
Marc Beninca 1 month ago
parent
commit
17f3a338a3
  1. 2
      __main__.py
  2. 5
      repository.py
  3. 2
      synchronization.py

2
__main__.py

@ -17,7 +17,7 @@ def check():
packages = []
broken = []
lo = local.Local()
for architecture in lo.architectures:
for architecture in lo:
for subsystem in architecture.subsystems.values():
for package in subsystem.catalog.packages.values():
packages.append((subsystem, package))

5
repository.py

@ -10,9 +10,12 @@ class Repository:
self.architectures = [architecture.Architecture(self, a)
for a in arguments.architectures]
def __iter__(self):
return self.architectures.__iter__()
def __str__(self):
lines = [
f' Location: {self.location}',
f'Architectures: {[a.name for a in self.architectures]}',
f'Architectures: {[architecture.name for architecture in self]}',
]
return os.linesep.join(lines)

2
synchronization.py

@ -15,7 +15,7 @@ class Synchronization:
self.threads = arguments.threads
def run(self):
for architecture in self.remote.architectures:
for architecture in self.remote:
for subsystem in architecture.subsystems.values():
for _, package in sorted(subsystem.catalog.packages.items()):
f = file.File(

Loading…
Cancel
Save