From 446b8f4a8ef78cb4605cfb551255bb455be411f0 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 16 Sep 2021 18:23:55 -0700 Subject: install system deps by searching for package managers on PATH With this change we handle the situation in which we don't know the OS of a host on which we need to install system packages more cleanly than before. Also rely on the new PACKAGE:INSTALLED to install the OS bootstrapper in INSTALLER:CLEANLY-INSTALLED-ONCE. This allows us to simplify usage of the property by replacing the ORIGINAL-OS argument with ORIGINAL-OS-ARCHITECTURE. Making this change does mean that we now have two ways to specify the different names a package has on different OSs: (i) something like OS:ETYPECASE where each branch applies a property which invokes an OS-specific package manager; and (ii) the plists supplied to PACKAGE:INSTALLED. Signed-off-by: Sean Whitton --- src/package.lisp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/package.lisp') diff --git a/src/package.lisp b/src/package.lisp index a32c21f..668e0d2 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -91,6 +91,7 @@ #:noop #:symbol-named #:memstring= + #:define-simple-error #:plist-to-cmd-args #:with-local-temporary-directory #:pathname-file @@ -443,10 +444,17 @@ #:pinned #:no-pdiffs)) +(defpackage :consfigurator.property.package + (:use #:cl #:alexandria #:consfigurator) + (:local-nicknames (#:apt #:consfigurator.property.apt)) + (:export #:*consfigurator-system-dependencies* + #:package-manager-not-found + #:installed)) + (defpackage :consfigurator.connection.sbcl (:use #:cl #:alexandria #:consfigurator) - (:local-nicknames (#:os #:consfigurator.property.os) - (#:apt #:consfigurator.property.apt))) + (:local-nicknames (#:os #:consfigurator.property.os) + (#:package #:consfigurator.property.package))) (defpackage :consfigurator.property.user (:use #:cl #:consfigurator) @@ -466,6 +474,7 @@ (:local-nicknames (#:service #:consfigurator.property.service) (#:apt #:consfigurator.property.apt) (#:os #:consfigurator.property.os) + (#:package #:consfigurator.property.package) (#:container #:consfigurator.property.container) (#:mount #:consfigurator.property.mount) (#:file #:consfigurator.property.file)) -- cgit v1.2.3