Commit 8d708b8b authored by Eric Timmons's avatar Eric Timmons
Browse files

cli less work: install

parent 4e131b55
......@@ -6,17 +6,12 @@
(uiop:define-package #:clpm-cli/commands/install
(:use #:cl
#:clpm-cli/common-args
#:clpm-cli/interface-defs
#:clpm/config
#:clpm/context
#:clpm/install
#:clpm/log)
(:import-from #:adopt))
#:clpm-cli/interface-defs)
(:import-from #:adopt)
(:import-from #:clpm))
(in-package #:clpm-cli/commands/install)
(setup-logger)
(adopt:define-string *help-text*
"Install systems or projects into a context.")
......@@ -124,17 +119,15 @@ with version constraint).
(asd-files (gethash :install-asds options))
(source-name (gethash :install-source options))
(no-deps-p (gethash :install-no-deps options))
(context-name (config-value :context))
(yes-p (gethash :yes options))
(ref (gethash :install-ref options)))
(install :projects project-specifiers
:systems system-specifiers
:asds (mapcar #'merge-pathnames asd-files)
:version version-string
:source source-name
:context context-name
:no-deps-p no-deps-p
:ref ref
:validate (make-diff-validate-fun :yesp yes-p)
:save-context-p t)
(clpm:install :projects project-specifiers
:systems system-specifiers
:asds (mapcar #'merge-pathnames asd-files)
:version version-string
:source source-name
:no-deps-p no-deps-p
:ref ref
:validate (make-diff-validate-fun :yesp yes-p)
:save-context-p t)
t))
......@@ -15,9 +15,10 @@
#:clpm/sync
#:clpm/update
#:clpm/version)
(:export #:install)
;; From config
(:export #:config-value)
;; From install
(:export #:install)
;; From source
(:export #:source-name
#:sources
......
......@@ -99,7 +99,8 @@ will be installed.
VALIDATE must be a function of one argument (a diff) and returns non-NIL if the
install should proceed."
(with-clpm-session ()
(let ((reqs (append (mapcar (rcurry #'make-requirement
(let ((context (get-context context))
(reqs (append (mapcar (rcurry #'make-requirement
:project
:version version :source source :ref ref :no-deps-p no-deps-p)
projects)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment