Skip to content

Commit

Permalink
Remove pacman_api and references
Browse files Browse the repository at this point in the history
  • Loading branch information
k4z4n0v4 committed Apr 9, 2024
1 parent 42d02e5 commit 0767f7d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 201 deletions.
10 changes: 1 addition & 9 deletions vmupdate/agent/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,7 @@ def get_package_manager(os_data, log, log_handler, log_level, no_progress):
if no_progress:
from source.dnf.dnf_cli import DNFCLI as PackageManager
elif os_data["os_family"] == "ArchLinux":
try:
from source.pacman.pacman_api import PACMAN as PackageManager
except ImportError:
log.warning("Failed to load pacman with progress bar. Use pacman cli.")
# no progress reporting
no_progress = True

if no_progress:
from source.pacman.pacman_cli import PACMANCLI as PackageManager
from source.pacman.pacman_cli import PACMANCLI as PackageManager
else:
raise NotImplementedError(
"Only Debian, RedHat and ArchLinux based OS is supported.")
Expand Down
190 changes: 0 additions & 190 deletions vmupdate/agent/source/pacman/pacman_api.py

This file was deleted.

3 changes: 1 addition & 2 deletions vmupdate/agent/source/pacman/pacman_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ def get_packages(self) -> Dict[str, List[str]]:

packages: Dict[str, List[str]] = {}
for line in result.out.splitlines():
cols = line.split()
package, version = cols
package, version = line.split()
packages.setdefault(package, []).append(version)

return packages
Expand Down

0 comments on commit 0767f7d

Please sign in to comment.