guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

15/20: squash! Rename to 'guix locate'.


From: guix-commits
Subject: 15/20: squash! Rename to 'guix locate'.
Date: Sun, 4 Jun 2023 17:34:41 -0400 (EDT)

civodul pushed a commit to branch wip-guix-index
in repository guix.

commit 0d3ad784038cf0cf0c8f100dc6ae0b7303a0bc5d
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Jun 4 18:19:06 2023 +0200

    squash! Rename to 'guix locate'.
---
 Makefile.am                             |  4 ++--
 guix/scripts/{index.scm => locate.scm}  | 10 +++++-----
 tests/{guix-index.sh => guix-locate.sh} | 14 +++++++-------
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 3fd9e61380..2d8c6a92bc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -304,7 +304,7 @@ MODULES =                                   \
   guix/scripts/archive.scm                     \
   guix/scripts/import.scm                      \
   guix/scripts/package.scm                     \
-  guix/scripts/index.scm                       \
+  guix/scripts/locate.scm                      \
   guix/scripts/install.scm                     \
   guix/scripts/remove.scm                      \
   guix/scripts/upgrade.scm                     \
@@ -594,7 +594,7 @@ SH_TESTS =                                  \
   tests/guix-gc.sh                             \
   tests/guix-git-authenticate.sh               \
   tests/guix-hash.sh                           \
-  tests/guix-index.sh                          \
+  tests/guix-locate.sh                         \
   tests/guix-pack.sh                           \
   tests/guix-pack-localstatedir.sh             \
   tests/guix-pack-relocatable.sh               \
diff --git a/guix/scripts/index.scm b/guix/scripts/locate.scm
similarity index 99%
rename from guix/scripts/index.scm
rename to guix/scripts/locate.scm
index af6fc41bf7..5040c323a4 100644
--- a/guix/scripts/index.scm
+++ b/guix/scripts/locate.scm
@@ -17,7 +17,7 @@
 ;;; You should have received a copy of the GNU General Public License
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
-(define-module (guix scripts index)
+(define-module (guix scripts locate)
   #:use-module ((guix config) #:select (%localstatedir))
   #:use-module (guix i18n)
   #:use-module ((guix ui)
@@ -49,7 +49,7 @@
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-37) ;; option
   #:use-module (srfi srfi-71)
-  #:export     (guix-index))
+  #:export     (guix-locate))
 
 (define application-version 3)
 
@@ -460,7 +460,7 @@ user or system."
                     user-database-file))))))
 
 (define (show-help)
-  (display (G_ "Usage: guix index [OPTIONS...] [search FILE...]
+  (display (G_ "Usage: guix locate [OPTIONS...] [search FILE...]
 Without argument, indexes (package, file) relationships from the machine.
 This allows indexation with 2 methods, out of the local:
 
@@ -505,7 +505,7 @@ See --database for customization.\n"))
            (lambda args (show-help) (exit 0)))
    (option '(#\V "version") #f #f
            (lambda (opt name arg result)
-             (show-version-and-exit "guix index")))
+             (show-version-and-exit "guix locate")))
    ;; index data out of the method (store or package)
    (option '(#\d "database") #f #t
            (lambda (opt name arg result)
@@ -529,7 +529,7 @@ See --database for customization.\n"))
   `((database . ,suitable-database)
     (method . manifests)))
 
-(define-command (guix-index . args)
+(define-command (guix-locate . args)
   (category packaging)
   (synopsis "search for packages providing a given file")
 
diff --git a/tests/guix-index.sh b/tests/guix-locate.sh
similarity index 83%
rename from tests/guix-index.sh
rename to tests/guix-locate.sh
index 3c5fa6753e..596d20eb43 100755
--- a/tests/guix-index.sh
+++ b/tests/guix-locate.sh
@@ -18,7 +18,7 @@
 # along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 #
-# Test the 'guix index' command-line utility.
+# Test the 'guix locate' command-line utility.
 #
 
 set -x
@@ -32,21 +32,21 @@ tmpdb_manifests="$tmpdir/manifests/db.sqlite"
 tmpdb_store="$tmpdir/store/db.sqlite"
 trap 'rm -rf "$tmpdir" "$tmpdb_store" "$tmpdb_manifests"' EXIT
 
-guix index --version
+guix locate --version
 
 # Preparing db locations for both indexation methods.
 mkdir -p "$(dirname "$tmpdb_manifests")" "$(dirname "$tmpdb_store")"
 
-cmd_manifests="guix index --database=$tmpdb_manifests --method=manifests"
-cmd_store="guix index --database=$tmpdb_store --method=store"
+cmd_manifests="guix locate --database=$tmpdb_manifests --method=manifests"
+cmd_store="guix locate --database=$tmpdb_store --method=store"
 
 # Lookup without any db should fail.
-guix index --database="$tmpdb_manifests" guile && false
-guix index --database="$tmpdb_store" guile && false
+guix locate --database="$tmpdb_manifests" guile && false
+guix locate --database="$tmpdb_store" guile && false
 
 # Lookup without anything in db should yield no results because the indexer
 # didn't stumble upon any profile.
-test -z "$(guix index --database="$tmpdb_manifests" guile)"
+test -z "$(guix locate --database="$tmpdb_manifests" guile)"
 
 # Install a package.
 guix package --bootstrap --install guile-bootstrap \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]