Commit 31922c01 authored by Eric Timmons's avatar Eric Timmons
Browse files

Add some functions to context queries

parent 4258a680
...@@ -6,11 +6,14 @@ ...@@ -6,11 +6,14 @@
(uiop:define-package #:clpm/context-queries (uiop:define-package #:clpm/context-queries
(:use #:cl (:use #:cl
#:clpm/context #:clpm/context
#:clpm/session) #:clpm/session
#:clpm/source)
(:export #:asd-pathnames (:export #:asd-pathnames
#:find-system-asd-pathname #:find-system-asd-pathname
#:installed-system-names
#:output-translations #:output-translations
#:source-registry)) #:source-registry
#:visible-primary-system-names))
(in-package #:clpm/context-queries) (in-package #:clpm/context-queries)
...@@ -22,6 +25,9 @@ ...@@ -22,6 +25,9 @@
(with-clpm-session () (with-clpm-session ()
(context-find-system-asd-pathname (get-context context) system-name))) (context-find-system-asd-pathname (get-context context) system-name)))
(defun installed-system-names (&key context)
(mapcar 'system-name (context-installed-systems (get-context context))))
(defun output-translations (&key context) (defun output-translations (&key context)
(with-clpm-session () (with-clpm-session ()
(context-output-translations (get-context context)))) (context-output-translations (get-context context))))
...@@ -35,3 +41,6 @@ ...@@ -35,3 +41,6 @@
:with-client with-client-p :with-client with-client-p
:ignore-inherited ignore-inherited-source-registry :ignore-inherited ignore-inherited-source-registry
:splice-inherited splice-inherited))) :splice-inherited splice-inherited)))
(defun visible-primary-system-names (&key context)
(context-visible-primary-system-names (get-context context)))
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