From 752385048b54bf59a0bfbecbf443f8e9e4504f56 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 21 Aug 2022 14:42:49 -0700 Subject: APT:{ALL,NONE}-INSTALLED-P: add docstrings Signed-off-by: Sean Whitton --- src/property/apt.lisp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/property/apt.lisp b/src/property/apt.lisp index f79f87c..36bbebd 100644 --- a/src/property/apt.lisp +++ b/src/property/apt.lisp @@ -399,6 +399,8 @@ in testing, you could use: :test #'string=) (defun all-installed-p (&rest packages) + "Return true if all of PACKAGES, a list of non-virtual packages, are +installed." (loop with n = 0 with packages* = (flatten packages) for line in (apt-cache-policy packages*) @@ -407,6 +409,8 @@ in testing, you could use: finally (return (= n (length packages*))))) (defun none-installed-p (&rest packages) + "Returns true if none of PACKAGES, a list of non-virtual packages, are +installed." (loop for line in (apt-cache-policy (flatten packages)) never (re:scan apt-cache-policy-installed line))) -- cgit v1.2.3