mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-22 21:25:43 -05:00
config: introduce pacman.check_space, use it in chroot.write_pacman_conf()
This commit is contained in:
parent
97c1bd1f74
commit
fe6fd7dfb5
3 changed files with 5 additions and 2 deletions
|
@ -287,7 +287,9 @@ class Chroot(AbstractChroot):
|
|||
f.write(makepkg_cross_conf)
|
||||
return makepkg_conf_path_relative
|
||||
|
||||
def write_pacman_conf(self, check_space: bool = False):
|
||||
def write_pacman_conf(self, check_space: Optional[bool] = None):
|
||||
if check_space is None:
|
||||
check_space = config.file['pacman']['check_space']
|
||||
os.makedirs(self.get_path('/etc'), exist_ok=True)
|
||||
conf_text = get_base_distro(self.arch).get_pacman_conf(self.extra_repos, check_space=check_space)
|
||||
with open(self.get_path('etc/pacman.conf'), 'w') as file:
|
||||
|
|
|
@ -21,7 +21,7 @@ class BaseChroot(Chroot):
|
|||
for dir in glob(os.path.join(self.path, '*')):
|
||||
rmtree(dir)
|
||||
|
||||
self.write_pacman_conf(check_space=True)
|
||||
self.write_pacman_conf()
|
||||
self.mount_pacman_cache()
|
||||
|
||||
logging.info(f'Pacstrapping chroot {self.name}: {", ".join(self.base_packages)}')
|
||||
|
|
|
@ -57,6 +57,7 @@ CONFIG_DEFAULTS: dict = {
|
|||
},
|
||||
'pacman': {
|
||||
'parallel_downloads': 4,
|
||||
'check_space': True,
|
||||
'repo_branch': DEFAULT_PACKAGE_BRANCH,
|
||||
},
|
||||
'paths': {
|
||||
|
|
Loading…
Add table
Reference in a new issue