subsystems
This commit is contained in:
parent
7033a6189e
commit
e9e6994c62
4 changed files with 13 additions and 9 deletions
|
@ -1,18 +1,18 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import distribution
|
import distribution
|
||||||
|
import subsystem
|
||||||
|
|
||||||
X86 = 'x86_64'
|
X86 = 'x86_64'
|
||||||
I86 = 'i686'
|
I86 = 'i686'
|
||||||
|
|
||||||
|
|
||||||
class Architecture:
|
class Architecture:
|
||||||
def __init__(self, name, bits):
|
def __init__(self, name, bits, subsystems):
|
||||||
self.name = name
|
self.name = name
|
||||||
self.bits = bits
|
self.bits = bits
|
||||||
self.distribution = distribution.Distribution(self)
|
self.distribution = distribution.Distribution(self)
|
||||||
# TODO subsystems
|
self.subsystems = {s: subsystem.SubSystem(self, s) for s in subsystems}
|
||||||
self.subsystems = {}
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
lines = [
|
lines = [
|
||||||
|
@ -21,7 +21,12 @@ class Architecture:
|
||||||
return os.linesep.join(lines)
|
return os.linesep.join(lines)
|
||||||
|
|
||||||
|
|
||||||
|
x86 = Architecture(X86, 64, [subsystem.MAIN,
|
||||||
|
'clang64', 'mingw64', 'ucrt64'])
|
||||||
|
i86 = Architecture(I86, 32, [subsystem.MAIN,
|
||||||
|
'clang32', 'mingw32'])
|
||||||
|
|
||||||
ARCHITECTURES = {
|
ARCHITECTURES = {
|
||||||
X86: Architecture(X86, 64),
|
X86: x86,
|
||||||
I86: Architecture(I86, 32),
|
I86: i86,
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,3 +86,4 @@ compression applying to archive
|
||||||
D = parse()
|
D = parse()
|
||||||
|
|
||||||
architectures = D[ARCHITECTURES]
|
architectures = D[ARCHITECTURES]
|
||||||
|
subsystems = D[SUBSYSTEMS]
|
||||||
|
|
|
@ -11,14 +11,13 @@ import repository
|
||||||
class Remote(repository.Repository):
|
class Remote(repository.Repository):
|
||||||
def __init__(self, args):
|
def __init__(self, args):
|
||||||
super().__init__(args[arguments.REMOTE])
|
super().__init__(args[arguments.REMOTE])
|
||||||
self.subsystems = args[arguments.SUBSYSTEMS]
|
|
||||||
self.load()
|
self.load()
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
archives = {}
|
archives = {}
|
||||||
c = {}
|
c = {}
|
||||||
for architecture in self.architectures:
|
for architecture in self.architectures:
|
||||||
subsystems = msys.get_subsystems(architecture, self.subsystems)
|
subsystems = architecture.subsystems.keys()
|
||||||
location = os.path.join(self.location,
|
location = os.path.join(self.location,
|
||||||
msys.get_distribution(architecture))
|
msys.get_distribution(architecture))
|
||||||
archives[architecture] = hypertext.HyperText(location).archive
|
archives[architecture] = hypertext.HyperText(location).archive
|
||||||
|
|
|
@ -17,8 +17,7 @@ class Synchronization:
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
for architecture in self.remote.architectures:
|
for architecture in self.remote.architectures:
|
||||||
for subsystem in msys.get_subsystems(architecture,
|
for subsystem in architecture.subsystems.keys():
|
||||||
self.remote.subsystems):
|
|
||||||
catalog = self.remote.catalogs[architecture][subsystem]
|
catalog = self.remote.catalogs[architecture][subsystem]
|
||||||
path = msys.get_subsystem(architecture, subsystem)
|
path = msys.get_subsystem(architecture, subsystem)
|
||||||
for _, package in sorted(catalog.packages.items()):
|
for _, package in sorted(catalog.packages.items()):
|
||||||
|
|
Loading…
Reference in a new issue