Hi!

As evhan suggested, this patch drops the "-all" option for chicken-status,
giving it thhe same view of the set of available eggs as is represented
by CHCIKEN_REPOSITORY_PATH. This is more consistent with what the
user sees. CHICKEN_INSTALL_REPOSITORY is still fully functional, but
needs to be in ..._PATH to be listed by chicken-status. THis also simplifies
the code a bit.


felix


From 51fffea68530ef9ea46dcdb44bc5fd71cd51ae07 Mon Sep 17 00:00:00 2001
From: felix <[email protected]>
Date: Sat, 29 Apr 2017 12:07:46 +0200
Subject: [PATCH] chicken-status: make -all the default behaviour

---
 chicken-status.mdoc |    2 --
 chicken-status.scm  |   11 +++--------
 manual/Extensions   |    1 -
 3 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/chicken-status.mdoc b/chicken-status.mdoc
index 509a80b..231cc19 100644
--- a/chicken-status.mdoc
+++ b/chicken-status.mdoc
@@ -52,8 +52,6 @@ as a glob pattern Pc
 list installed files
 .It Fl h, Fl help
 show usage and exit
-.It Fl a, Fl all
-Scan all repositories in CHICKEN_REPOSITORY_PATH
 .It Fl host
 when cross-compiling, show status of host extensions only
 .It Fl list
diff --git a/chicken-status.scm b/chicken-status.scm
index dee8150..8ec972c 100644
--- a/chicken-status.scm
+++ b/chicken-status.scm
@@ -43,13 +43,11 @@
 
   (define host-extensions #t)
   (define target-extensions #t)
-  (define all-repos #f)
 
   (define (repo-path)
-    (cond ((and cross-chicken (not host-extensions))
-           (list (destination-repository 'target)))
-          (all-repos (##sys#split-path (repository-path)))
-          (else (list (destination-repository 'host)))))
+    (if (and cross-chicken (not host-extensions))
+        (list (destination-repository 'target))
+        (##sys#split-path (repository-path))))
 
   (define (find-in-repo name)
     (let loop ((dirs (repo-path)))
@@ -232,9 +230,6 @@ EOF
                     ((string=? arg "-match")
                      (set! mtch #t)
                      (loop (cdr args) pats))
-                    ((member arg '("-a" "-all"))
-                     (set! all-repos #t)
-                     (loop (cdr args) pats))
 		    ((string=? arg "-list")
 		     (set! dump #t)
 		     (loop (cdr args) pats))
diff --git a/manual/Extensions b/manual/Extensions
index 9ece18b..25bc75b 100644
--- a/manual/Extensions
+++ b/manual/Extensions
@@ -598,7 +598,6 @@ Available options:
 
 ; {{-h   -help}} : show usage information and exit
 ; {{-version}} : show version and exit
-; {{-a   -all}} : Scan all repositories in {{CHICKEN_REPOSITORY_PATH}}
 ; {{-f   -files}} : list installed files
 ; {{-match}} : treat egg-names as glob patterns
 ; {{-host}} : when cross-compiling, show eggs for host system only
-- 
1.7.9.5

_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to