Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/pacman.py
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib/pacman.py')
-rw-r--r--archinstall/lib/pacman.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/archinstall/lib/pacman.py b/archinstall/lib/pacman.py
index 0dfd5afa..f5514f05 100644
--- a/archinstall/lib/pacman.py
+++ b/archinstall/lib/pacman.py
@@ -1,10 +1,9 @@
-import logging
import pathlib
import time
from typing import TYPE_CHECKING, Any
from .general import SysCommand
-from .output import log
+from .output import warn, error
if TYPE_CHECKING:
_: Any
@@ -19,14 +18,14 @@ def run_pacman(args :str, default_cmd :str = 'pacman') -> SysCommand:
pacman_db_lock = pathlib.Path('/var/lib/pacman/db.lck')
if pacman_db_lock.exists():
- log(_('Pacman is already running, waiting maximum 10 minutes for it to terminate.'), level=logging.WARNING, fg="red")
+ warn(_('Pacman is already running, waiting maximum 10 minutes for it to terminate.'))
started = time.time()
while pacman_db_lock.exists():
time.sleep(0.25)
if time.time() - started > (60 * 10):
- log(_('Pre-existing pacman lock never exited. Please clean up any existing pacman sessions before using archinstall.'), level=logging.WARNING, fg="red")
+ error(_('Pre-existing pacman lock never exited. Please clean up any existing pacman sessions before using archinstall.'))
exit(1)
return SysCommand(f'{default_cmd} {args}')