chroot: remove initialize=False arg from Chroot()

This commit is contained in:
InsanePrawn 2022-09-28 01:10:05 +02:00
parent 3c315d7899
commit 9fbb2dec46
2 changed files with 1 additions and 5 deletions

View file

@ -34,7 +34,6 @@ class AbstractChroot(Protocol):
name: str,
arch: Arch,
copy_base: bool,
initialize: bool,
extra_repos: Mapping[str, RepoInfo],
base_packages: list[str],
path_override: str = None,
@ -89,7 +88,6 @@ class Chroot(AbstractChroot):
name: str,
arch: Arch,
copy_base: bool = None,
initialize: bool = False,
extra_repos: Mapping[str, RepoInfo] = {},
base_packages: list[str] = ['base', 'base-devel', 'git'],
path_override: str = None,
@ -107,8 +105,6 @@ class Chroot(AbstractChroot):
self.copy_base = copy_base if copy_base is not None else self._copy_base
self.extra_repos = deepcopy(extra_repos)
self.base_packages = base_packages.copy()
if initialize:
self.initialize()
if self.name.startswith(BASE_CHROOT_PREFIX) and set(get_kupfer_local(self.arch).repos).intersection(set(self.extra_repos)):
raise Exception(f'Base chroot {self.name} had local repos specified: {self.extra_repos}')

View file

@ -49,7 +49,7 @@ class BaseChroot(Chroot):
def get_base_chroot(arch: Arch) -> BaseChroot:
name = base_chroot_name(arch)
args = dict(arch=arch, copy_base=False, initialize=False)
args = dict(arch=arch, copy_base=False)
chroot = get_chroot(name, initialize=False, chroot_class=BaseChroot, chroot_args=args)
assert isinstance(chroot, BaseChroot)
return chroot