Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/packages
diff options
context:
space:
mode:
authorDaniel <blackrabbit256@gmail.com>2022-02-18 21:33:28 +1100
committerGitHub <noreply@github.com>2022-02-18 11:33:28 +0100
commit4b3b21ed756463914d618abe11345c9839217473 (patch)
tree94fecd8d11262a5423d6af3805f24d63012519b5 /archinstall/lib/packages
parent62a6aec197b0e83ab91fdec1ab15427ecf749dac (diff)
Check if pacman is available (#958)
* Check if pacman is available * Update pacman call * Added a graceful wait to `run_pacman` * Fix flake8 Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com> Co-authored-by: Anton Hvornum <anton.feeds+github@gmail.com>
Diffstat (limited to 'archinstall/lib/packages')
-rw-r--r--archinstall/lib/packages/packages.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/archinstall/lib/packages/packages.py b/archinstall/lib/packages/packages.py
index 26d8ff68..b2c8ab8e 100644
--- a/archinstall/lib/packages/packages.py
+++ b/archinstall/lib/packages/packages.py
@@ -4,8 +4,8 @@ import urllib.request
from typing import Dict, Any, Tuple, List
from ..exceptions import PackageError, SysCallError
-from ..general import SysCommand
from ..models.dataclasses import PackageSearch, PackageSearchResult, LocalPackage
+from ..pacman import run_pacman
BASE_URL_PKG_SEARCH = 'https://archlinux.org/packages/search/json/?name={package}'
# BASE_URL_PKG_CONTENT = 'https://archlinux.org/packages/search/json/'
@@ -98,7 +98,7 @@ def validate_package_list(packages :list) -> Tuple[list, list]:
def installed_package(package :str) -> LocalPackage:
package_info = {}
try:
- for line in SysCommand(f"pacman -Q --info {package}"):
+ for line in run_pacman(f"-Q --info {package}"):
if b':' in line:
key, value = line.decode().split(':', 1)
package_info[key.strip().lower().replace(' ', '_')] = value.strip()