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

Add some functions to context queries

parent 4258a680
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -6,11 +6,14 @@
(uiop:define-package #:clpm/context-queries
    (:use #:cl
          #:clpm/context
          #:clpm/session)
          #:clpm/session
          #:clpm/source)
  (:export #:asd-pathnames
           #:find-system-asd-pathname
           #:installed-system-names
           #:output-translations
           #:source-registry))
           #:source-registry
           #:visible-primary-system-names))

(in-package #:clpm/context-queries)

@@ -22,6 +25,9 @@
  (with-clpm-session ()
    (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)
  (with-clpm-session ()
    (context-output-translations (get-context context))))
@@ -35,3 +41,6 @@
     :with-client with-client-p
     :ignore-inherited ignore-inherited-source-registry
     :splice-inherited splice-inherited)))

(defun visible-primary-system-names (&key context)
  (context-visible-primary-system-names (get-context context)))