chroot: remove initialize=False arg from Chroot()
This commit is contained in:
parent
3c315d7899
commit
9fbb2dec46
2 changed files with 1 additions and 5 deletions
|
@ -34,7 +34,6 @@ class AbstractChroot(Protocol):
|
||||||
name: str,
|
name: str,
|
||||||
arch: Arch,
|
arch: Arch,
|
||||||
copy_base: bool,
|
copy_base: bool,
|
||||||
initialize: bool,
|
|
||||||
extra_repos: Mapping[str, RepoInfo],
|
extra_repos: Mapping[str, RepoInfo],
|
||||||
base_packages: list[str],
|
base_packages: list[str],
|
||||||
path_override: str = None,
|
path_override: str = None,
|
||||||
|
@ -89,7 +88,6 @@ class Chroot(AbstractChroot):
|
||||||
name: str,
|
name: str,
|
||||||
arch: Arch,
|
arch: Arch,
|
||||||
copy_base: bool = None,
|
copy_base: bool = None,
|
||||||
initialize: bool = False,
|
|
||||||
extra_repos: Mapping[str, RepoInfo] = {},
|
extra_repos: Mapping[str, RepoInfo] = {},
|
||||||
base_packages: list[str] = ['base', 'base-devel', 'git'],
|
base_packages: list[str] = ['base', 'base-devel', 'git'],
|
||||||
path_override: str = None,
|
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.copy_base = copy_base if copy_base is not None else self._copy_base
|
||||||
self.extra_repos = deepcopy(extra_repos)
|
self.extra_repos = deepcopy(extra_repos)
|
||||||
self.base_packages = base_packages.copy()
|
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)):
|
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}')
|
raise Exception(f'Base chroot {self.name} had local repos specified: {self.extra_repos}')
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ class BaseChroot(Chroot):
|
||||||
|
|
||||||
def get_base_chroot(arch: Arch) -> BaseChroot:
|
def get_base_chroot(arch: Arch) -> BaseChroot:
|
||||||
name = base_chroot_name(arch)
|
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)
|
chroot = get_chroot(name, initialize=False, chroot_class=BaseChroot, chroot_args=args)
|
||||||
assert isinstance(chroot, BaseChroot)
|
assert isinstance(chroot, BaseChroot)
|
||||||
return chroot
|
return chroot
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue