From 4b3b21ed756463914d618abe11345c9839217473 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 18 Feb 2022 21:33:28 +1100 Subject: 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 Co-authored-by: Anton Hvornum --- archinstall/lib/packages/packages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'archinstall/lib/packages') 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() -- cgit v1.2.3-70-g09d2