diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-08-21 14:44:16 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-08-25 11:13:52 -0700 |
commit | bdaa1a3ab4733767f5ee38b79e7b5f171879135c (patch) | |
tree | 2376443535dd658da3db4d6c91c6d180ed2ec8a1 /src/property/apt.lisp | |
parent | 752385048b54bf59a0bfbecbf443f8e9e4504f56 (diff) | |
download | consfigurator-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>
Diffstat (limited to 'src/property/apt.lisp')
-rw-r--r-- | src/property/apt.lisp | 13 |
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 |