gather: Port hybrid method
Update the code to consume multiple source repos. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
a446593698
commit
6fa478e688
@ -100,7 +100,7 @@ class GatherMethodHybrid(pungi.phases.gather.method.GatherMethodBase):
|
|||||||
return self.package_maps[arch]
|
return self.package_maps[arch]
|
||||||
|
|
||||||
def _prepare_packages(self):
|
def _prepare_packages(self):
|
||||||
repo_path = self.compose.paths.work.arch_repo(arch=self.arch)
|
for repo_path in self.get_repos():
|
||||||
md = cr.Metadata()
|
md = cr.Metadata()
|
||||||
md.locate_and_load_xml(repo_path)
|
md.locate_and_load_xml(repo_path)
|
||||||
for key in md.keys():
|
for key in md.keys():
|
||||||
@ -183,6 +183,7 @@ class GatherMethodHybrid(pungi.phases.gather.method.GatherMethodBase):
|
|||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
self.arch = arch
|
self.arch = arch
|
||||||
|
self.variant = variant
|
||||||
self.valid_arches = get_valid_arches(arch, multilib=True)
|
self.valid_arches = get_valid_arches(arch, multilib=True)
|
||||||
self.package_sets = package_sets
|
self.package_sets = package_sets
|
||||||
|
|
||||||
@ -220,8 +221,16 @@ class GatherMethodHybrid(pungi.phases.gather.method.GatherMethodBase):
|
|||||||
)
|
)
|
||||||
# maybe check invalid sigkeys
|
# maybe check invalid sigkeys
|
||||||
|
|
||||||
|
def get_repos(self):
|
||||||
|
repos = []
|
||||||
|
for pkgset in self.package_sets:
|
||||||
|
if self.variant.pkgsets and pkgset.name not in self.variant.pkgsets:
|
||||||
|
continue
|
||||||
|
repos.append(pkgset.paths[self.arch])
|
||||||
|
return repos
|
||||||
|
|
||||||
def run_solver(self, variant, arch, packages, platform, filter_packages):
|
def run_solver(self, variant, arch, packages, platform, filter_packages):
|
||||||
repos = [self.compose.paths.work.arch_repo(arch=arch)]
|
repos = self.get_repos()
|
||||||
results = set()
|
results = set()
|
||||||
result_modules = set()
|
result_modules = set()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user