feat(commit): individual packages from config respected

This commit is contained in:
2026-05-07 18:25:19 +02:00
parent b7218c2a82
commit ecb2952a7e
9 changed files with 69 additions and 16 deletions
+3 -2
View File
@@ -3,9 +3,10 @@ from commands.util.diff import pkg_diff
from commands.util.input_mgr import confirm, password
from commands.util.printing.diff import print_diff
from config.dtype import ArchMgrConfig
def commit(force: bool = False, no_render: bool = False):
def commit(config: ArchMgrConfig, force: bool = False, no_render: bool = False):
"""Commit the changes to the system
Args:
@@ -15,7 +16,7 @@ def commit(force: bool = False, no_render: bool = False):
"""
# TODO: Make sure we don't uninstall critical system packages by accident (i.e. prompt user)
# Probably do that check in the pacman util lib tho
add, remove = pkg_diff([], pacman.list_explicitly_installed())
add, remove = pkg_diff(config["pkgs"]["individual"] or [], pacman.list_explicitly_installed())
print_diff(add, remove)
if confirm(False, "Do you really want to proceed?"):
pacman.install_package_list(add)