From e3b580c20064767fc14f449834ec8f3bb96cd4a3 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 5 Apr 2013 09:38:43 -0500 Subject: [PATCH] add installed-pkg-names --- collects/pkg/lib.rkt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/collects/pkg/lib.rkt b/collects/pkg/lib.rkt index 096fac1106..bb1ed52c77 100644 --- a/collects/pkg/lib.rkt +++ b/collects/pkg/lib.rkt @@ -1133,6 +1133,11 @@ (list (~a (package-directory pkg))) empty)))))))) +(define (installed-pkg-names) + (with-package-lock/read-only + (define db (read-pkg-db)) + (sort (hash-keys db) string-ci<=?))) + (define (config-cmd config:set key+vals) (cond [config:set @@ -1289,4 +1294,6 @@ #:ignore-checksums? boolean?) (or/c #f (listof (or/c path-string? (non-empty-listof path-string?)))))] [get-default-package-scope - (-> (or/c 'i 'u 's))])) + (-> (or/c 'i 'u 's))] + [installed-pkg-names + (-> (listof string?))]))