mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-06-26 10:23:10 -04:00
replace os.makedirs with exec.{root_,}makedir where applicable
This commit is contained in:
parent
818b354000
commit
707c61f026
7 changed files with 27 additions and 18 deletions
|
@ -6,6 +6,8 @@ from shutil import rmtree
|
|||
|
||||
from constants import Arch
|
||||
from exec.cmd import run_root_cmd
|
||||
from exec.file import makedir, root_makedir
|
||||
from config import config
|
||||
|
||||
from .abstract import Chroot, get_chroot
|
||||
from .helpers import base_chroot_name
|
||||
|
@ -20,6 +22,8 @@ class BaseChroot(Chroot):
|
|||
logging.info(f'Resetting {self.name}')
|
||||
for dir in glob(os.path.join(self.path, '*')):
|
||||
rmtree(dir)
|
||||
makedir(config.get_path('chroots'))
|
||||
root_makedir(self.get_path())
|
||||
|
||||
self.write_pacman_conf()
|
||||
self.mount_pacman_cache()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue