Add reposcan option for variants that should not look at compose

This commit is contained in:
Louis Abel 2024-10-01 13:56:56 -07:00
parent 5e6427ea4b
commit 30a84cfed5
Signed by untrusted user: label
GPG Key ID: 2A6975660E424560
4 changed files with 34 additions and 19 deletions

View File

@ -53,12 +53,14 @@
images:
dvd:
disc: True
reposcan: True
variant: 'AppStream'
repos:
- 'BaseOS'
- 'AppStream'
minimal:
disc: True
reposcan: False
isoskip: True
repos:
- 'minimal'

View File

@ -53,6 +53,7 @@
images:
dvd:
disc: True
reposcan: True
variant: 'AppStream'
repos:
- 'BaseOS'
@ -60,6 +61,7 @@
minimal:
disc: True
isoskip: True
reposcan: False
repos:
- 'minimal'
- 'BaseOS'

View File

@ -53,6 +53,7 @@
images:
dvd:
disc: True
reposcan: True
variant: 'AppStream'
repos:
- 'BaseOS'
@ -60,6 +61,7 @@
minimal:
disc: True
isoskip: True
reposcan: False
repos:
- 'minimal'
- 'BaseOS'

View File

@ -743,9 +743,14 @@ class IsoBuild:
for y in images_to_build:
if 'isoskip' in self.iso_map['images'][y] and self.iso_map['images'][y]['isoskip']:
self.log.info(Color.WARN + 'Skipping ' + y + ' image')
self.log.info(Color.WARN + f'Skipping {y} image')
continue
reposcan = True
if 'reposcan' in self.iso_map['images'][y] and not self.iso_map['images'][y]['reposcan']:
self.log.info(Color.WARN + f"Skipping compose repository scans for {y}")
reposcan = False
# Kind of hacky, but if we decide to have more than boot/dvd iso's,
# we need to make sure volname matches the initial lorax image,
# which the volid contains "dvd". AKA, file name doesn't always
@ -770,6 +775,7 @@ class IsoBuild:
a,
y,
self.iso_map['images'][y]['repos'],
reposcan=reposcan
)
self._extra_iso_local_config(a, y, grafts, work_root, volname)
@ -1091,6 +1097,7 @@ class IsoBuild:
arch,
iso,
variants,
reposcan: bool = True,
):
"""
Get a list of packages for an extras ISO. This should NOT be called
@ -1120,6 +1127,8 @@ class IsoBuild:
# actually get the boot data
files = self._get_grafts([lorax_for_var, extra_files_for_var])
# Some variants cannot go through a proper scan.
if reposcan:
# This is to get all the packages for each repo
for repo in variants:
pkg_for_var = os.path.join(