From cf1f2e06f58d6c9c9a97c12f93f13d65c3c10824 Mon Sep 17 00:00:00 2001 From: SouthFox Date: Thu, 5 Dec 2024 11:51:22 +0800 Subject: [PATCH] [feat/arch] update pacman packages diff cmd Signed-off-by: SouthFox --- arch.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/arch.scm b/arch.scm index eb8742e..36c6cda 100644 --- a/arch.scm +++ b/arch.scm @@ -133,13 +133,15 @@ files, and further processed during activation."))) (display "Nothing to install...!"))) (define (arch-get-pacman-package-list) - (let* ((data (open-input-pipe "pacman -Qqe")) - (result (string-split (read-string data) #\newline))) + (let* ((explicitly-packages (string-split (read-string (open-input-pipe "pacman -Qqe")) #\newline)) + (all-packages (string-split (read-string (open-input-pipe "pacman -Qq")) #\newline))) (display "Hint: Run \n") - (display (string-append "pacman -R " (string-join (list-difference result arch-user-packages) " ") "\n")) - (display "sync packages.") + (display (string-append + "pacman -R " + (string-join (list-difference explicitly-packages arch-user-packages) " ") "\n")) + (display "command to sync packages.\n") - (list-difference arch-user-packages result))) + (list-difference arch-user-packages all-packages))) (arch-package-update) (arch-install-packages (arch-get-pacman-package-list))