guix-commits
[Top][All Lists]
Advanced

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

08/20: squash! Remove debugging statements.


From: guix-commits
Subject: 08/20: squash! Remove debugging statements.
Date: Sun, 4 Jun 2023 17:34:40 -0400 (EDT)

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

commit 26d03e68d8e52b3bc25a12ff07bdd58208fb8859
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun May 21 14:41:29 2023 +0200

    squash! Remove debugging statements.
---
 guix/scripts/index.scm | 37 -------------------------------------
 1 file changed, 37 deletions(-)

diff --git a/guix/scripts/index.scm b/guix/scripts/index.scm
index 8027f87ebf..fd5535dc8a 100644
--- a/guix/scripts/index.scm
+++ b/guix/scripts/index.scm
@@ -50,8 +50,6 @@
   #:use-module (srfi srfi-71)
   #:export     (guix-index))
 
-(define debug #f)
-
 (define application-version 3)
 
 ;; The following schema is the full schema at the `application-version`.  It
@@ -196,10 +194,6 @@ VALUES (:name, :basename, :directory);"
                          #:version version)
   (match (sqlite-fold cons '() stmt-select-package)
     ((#(package-id))
-     (when debug
-       (format #t "(pkg, version, pkg-id): (~a, ~a, ~a)"
-               package version package-id)
-       (pk 'package package-id package))
      (for-each (lambda (directory)
                  (define (strip file)
                    (string-drop file (+ (string-length directory) 1)))
@@ -218,9 +212,6 @@ VALUES (:name, :basename, :directory);"
                    (sqlite-fold (const #t) #t stmt-insert-directory)
 
                    (let ((directory-id (last-insert-row-id db)))
-                     (when debug
-                       (format #t "(name, package, dir-id): (~a, ~a, ~a)\n"
-                               directory package-id directory-id))
                      (for-each (lambda (file)
                                  ;; If DIRECTORY is a symlink, (find-files
                                  ;; DIRECTORY) returns the DIRECTORY singleton.
@@ -486,22 +477,12 @@ See --database for customization.\n"))
    ;; index data out of the method (store or package)
    (option '(#\d "database") #f #t
            (lambda (opt name arg result)
-             (when debug
-               (format #t "%options: --database: opt ~a\n" opt)
-               (format #t "%options: --database: name ~a\n" name)
-               (format #t "%options: --database: arg ~a\n" arg)
-               (format #t "%options: --database: result ~a\n" result))
              (alist-cons 'database arg
                          (alist-delete 'database result))))
 
    ;; index data out of the method (store or package)
    (option '(#\m "method") #f #t
            (lambda (opt name arg result)
-             (when debug
-               (format #t "%options: --method: opt ~a\n" opt)
-               (format #t "%options: --method: name ~a\n" name)
-               (format #t "%options: --method: arg ~a\n" arg)
-               (format #t "%options: --method: result ~a\n" result))
              (match arg
                ((or "manifests" "store")
                 (alist-cons 'method (string->symbol arg)
@@ -519,11 +500,6 @@ See --database for customization.\n"))
 
   (define (parse-sub-command arg result)
     ;; Parse sub-command ARG and augment RESULT accordingly.
-    (when debug
-      (format #t "parse-sub-command: arg: ~a\n" arg)
-      (format #t "parse-sub-command: result: ~a\n" result)
-      (format #t "parse-sub-command: (assoc-ref result 'action): ~a\n" 
(assoc-ref result 'action))
-      (format #t "parse-sub-command: (assoc-ref result 'argument): ~a\n" 
(assoc-ref result 'argument)))
     (if (assoc-ref result 'action)
         (alist-cons 'argument arg result)
         (let ((action (string->symbol arg)))
@@ -544,12 +520,6 @@ See --database for customization.\n"))
     (let* ((args   (reverse (filter-map (match-pair 'argument) opts)))
            (count  (length args))
            (action (or (assoc-ref opts 'action) 'index)))
-
-      (when debug
-        (format #t "option-arguments: args: ~a\n" args)
-        (format #t "option-arguments: count: ~a\n" count)
-        (format #t "option-arguments: action: ~a\n" action))
-
       (define (fail)
         (leave (G_ "wrong number of arguments for action '~a'~%")
                action))
@@ -569,13 +539,6 @@ See --database for customization.\n"))
            (action   (assoc-ref args 'action))
            (database (assoc-ref args 'database))
            (method   (assoc-ref args 'method)))
-      (when debug
-        (format #t "main: opts: ~a\n" opts)
-        (format #t "main: args: ~a\n" args)
-        (format #t "main: action: ~a\n" action)
-        (format #t "main: database: ~a\n" database)
-        (format #t "main: method: ~a\n" method))
-
       (match action
         ('search
          (unless (file-exists? database)



reply via email to

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