mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-06-25 09:58:21 -04:00
chroot: clean up the copy_base instance var mess
This commit is contained in:
parent
8a31a98946
commit
746e42a4f6
4 changed files with 13 additions and 9 deletions
|
@ -4,7 +4,7 @@ import os
|
|||
import subprocess
|
||||
from copy import deepcopy
|
||||
from shlex import quote as shell_quote
|
||||
from typing import Protocol, Union, Optional, Mapping
|
||||
from typing import ClassVar, Protocol, Union, Optional, Mapping
|
||||
from uuid import uuid4
|
||||
|
||||
from config import config
|
||||
|
@ -78,6 +78,9 @@ class AbstractChroot(Protocol):
|
|||
|
||||
class Chroot(AbstractChroot):
|
||||
|
||||
_copy_base: ClassVar[bool] = False
|
||||
copy_base: bool
|
||||
|
||||
def __repr__(self):
|
||||
return f'Chroot({self.name})'
|
||||
|
||||
|
@ -101,7 +104,7 @@ class Chroot(AbstractChroot):
|
|||
self.name = name
|
||||
self.arch = arch
|
||||
self.path = path_override or os.path.join(config.get_path('chroots'), name)
|
||||
self.copy_base = copy_base
|
||||
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue