iterate repository architectures
This commit is contained in:
parent
884a4e1583
commit
4d1237b6fd
3 changed files with 6 additions and 3 deletions
|
@ -17,7 +17,7 @@ def check():
|
||||||
packages = []
|
packages = []
|
||||||
broken = []
|
broken = []
|
||||||
lo = local.Local()
|
lo = local.Local()
|
||||||
for architecture in lo.architectures:
|
for architecture in lo:
|
||||||
for subsystem in architecture.subsystems.values():
|
for subsystem in architecture.subsystems.values():
|
||||||
for package in subsystem.catalog.packages.values():
|
for package in subsystem.catalog.packages.values():
|
||||||
packages.append((subsystem, package))
|
packages.append((subsystem, package))
|
||||||
|
|
|
@ -10,9 +10,12 @@ class Repository:
|
||||||
self.architectures = [architecture.Architecture(self, a)
|
self.architectures = [architecture.Architecture(self, a)
|
||||||
for a in arguments.architectures]
|
for a in arguments.architectures]
|
||||||
|
|
||||||
|
def __iter__(self):
|
||||||
|
return self.architectures.__iter__()
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
lines = [
|
lines = [
|
||||||
f' Location: {self.location}',
|
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)
|
return os.linesep.join(lines)
|
||||||
|
|
|
@ -15,7 +15,7 @@ class Synchronization:
|
||||||
self.threads = arguments.threads
|
self.threads = arguments.threads
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
for architecture in self.remote.architectures:
|
for architecture in self.remote:
|
||||||
for subsystem in architecture.subsystems.values():
|
for subsystem in architecture.subsystems.values():
|
||||||
for _, package in sorted(subsystem.catalog.packages.items()):
|
for _, package in sorted(subsystem.catalog.packages.items()):
|
||||||
f = file.File(
|
f = file.File(
|
||||||
|
|
Loading…
Reference in a new issue