aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-08-21 14:44:16 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-08-25 11:13:52 -0700
commitbdaa1a3ab4733767f5ee38b79e7b5f171879135c (patch)
tree2376443535dd658da3db4d6c91c6d180ed2ec8a1
parent752385048b54bf59a0bfbecbf443f8e9e4504f56 (diff)
downloadconsfigurator-bdaa1a3ab4733767f5ee38b79e7b5f171879135c.tar.gz
use WITH-CHANGES-DPKG-STATUS in preference to {ALL,NONE}-INSTALLED-P
This fixes at least one bug: previously APT:INSTALLED and APT:INSTALLED-MINIMALLY would report that a change was made whenever the list of packages passed to them contained the name of a virtual package. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/property/apt.lisp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/property/apt.lisp b/src/property/apt.lisp
index 36bbebd..a300793 100644
--- a/src/property/apt.lisp
+++ b/src/property/apt.lisp
@@ -44,19 +44,20 @@
(:desc #?"apt installed @{packages}")
(:preprocess (flatten packages))
(:hostattrs (os:required 'os:debianlike))
- (:check (all-installed-p packages))
(:apply
- (with-maybe-update (apt-get :inform "-y" "install" packages))))
+ (with-maybe-update
+ (with-changes-dpkg-status
+ (apt-get :inform "-y" "install" packages)))))
(defprop installed-minimally :posix (&rest packages)
"Ensure all of the apt packages PACKAGES are installed, without recommends."
(:desc #?"apt installed @{packages}")
(:preprocess (flatten packages))
(:hostattrs (os:required 'os:debianlike))
- (:check (all-installed-p packages))
(:apply
(with-maybe-update
- (apt-get :inform "-y" "--no-install-recommends" "install" packages))))
+ (with-changes-dpkg-status
+ (apt-get :inform "-y" "--no-install-recommends" "install" packages)))))
(defun install-backports (args packages)
(with-maybe-update
@@ -93,10 +94,8 @@ each of those dependencies in PACKAGES."
(:hostattrs
(declare (ignore packages))
(os:required 'os:debianlike))
- (:check
- (none-installed-p packages))
(:apply
- (apt-get :inform "-y" "remove" packages)))
+ (with-changes-dpkg-status (apt-get :inform "-y" "remove" packages))))
(defprop reconfigured :posix (package &rest triples)
"Where each of TRIPLES is a list of three strings, a debconf template, type