diff options
author | Christopher Baines <mail@cbaines.net> | 2025-03-10 14:12:42 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2025-03-11 17:15:00 +0000 |
commit | 2eb5714829129980851627f34fc8c97156015fb2 (patch) | |
tree | 07e807a80fa5995f59bd97deeb8310552a811fec | |
parent | 8c79536fa4ad6e7f4f6214f5d391d109afcbf51b (diff) | |
download | data-service-2eb5714829129980851627f34fc8c97156015fb2.tar data-service-2eb5714829129980851627f34fc8c97156015fb2.tar.gz |
Use = when comparing numbers
-rw-r--r-- | guix-data-service/builds.scm | 6 | ||||
-rw-r--r-- | guix-data-service/comparison.scm | 2 | ||||
-rw-r--r-- | guix-data-service/data-deletion.scm | 2 | ||||
-rw-r--r-- | guix-data-service/database.scm | 4 | ||||
-rw-r--r-- | guix-data-service/jobs.scm | 6 | ||||
-rw-r--r-- | guix-data-service/web/compare/html.scm | 2 | ||||
-rw-r--r-- | guix-data-service/web/revision/controller.scm | 6 | ||||
-rw-r--r-- | guix-data-service/web/revision/html.scm | 8 | ||||
-rw-r--r-- | guix-data-service/web/view/html.scm | 8 | ||||
-rw-r--r-- | scripts/guix-data-service-process-branch-updated-mbox.in | 2 |
10 files changed, 23 insertions, 23 deletions
diff --git a/guix-data-service/builds.scm b/guix-data-service/builds.scm index 2fe31ce..342a802 100644 --- a/guix-data-service/builds.scm +++ b/guix-data-service/builds.scm @@ -418,7 +418,7 @@ WHERE derivation_output_details.path = $1" (http-request build-url))) (cond - ((eq? (response-code response) 200) + ((= (response-code response) 200) (json-string->scm (bytevector->string body "utf-8"))) (else @@ -439,7 +439,7 @@ WHERE derivation_output_details.path = $1" (read-to-eof port)))) (handler (cond - ((eq? (response-code response) 200) + ((= (response-code response) 200) (json-string->scm (bytevector->string response-body "utf-8"))) @@ -475,7 +475,7 @@ WHERE derivation_output_details.path = $1" (read-to-eof port)))) (handler (cond - ((eq? (response-code response) 200) + ((= (response-code response) 200) (json-string->scm (bytevector->string response-body "utf-8"))) diff --git a/guix-data-service/comparison.scm b/guix-data-service/comparison.scm index 727c515..51d35c2 100644 --- a/guix-data-service/comparison.scm +++ b/guix-data-service/comparison.scm @@ -61,7 +61,7 @@ (define group-by-last-element (lambda (vals) (let ((groups (last vals))) - (cons (if (eq? (length groups) 2) + (cons (if (= (length groups) 2) 'common (first groups)) (drop-right vals 1))))) diff --git a/guix-data-service/data-deletion.scm b/guix-data-service/data-deletion.scm index 1e0f7e4..d25c2ae 100644 --- a/guix-data-service/data-deletion.scm +++ b/guix-data-service/data-deletion.scm @@ -677,7 +677,7 @@ SET CONSTRAINTS derivations_by_output_details_set_derivation_id_fkey DEFERRED") (let loop ((total-deleted 0)) (let ((batch-deleted-count (delete-batch conn))) - (if (eq? 0 batch-deleted-count) + (if (= 0 batch-deleted-count) (begin (hash-clear! ignored-derivation-ids) (let ((batch-deleted-count (delete-batch conn))) diff --git a/guix-data-service/database.scm b/guix-data-service/database.scm index cb9402e..26e40a0 100644 --- a/guix-data-service/database.scm +++ b/guix-data-service/database.scm @@ -172,7 +172,7 @@ (simple-format #t "running command: ~A\n" (string-join command)) (let ((pid (spawn (%config 'sqitch) command))) - (unless (= 0 (status:exit-val (cdr (waitpid pid)))) + (unless (= 0 (status:exit-val (cdr (waitpid pid)))) ;; TODO Don't use waitppid (simple-format (current-error-port) "error: sqitch command failed\n") @@ -318,7 +318,7 @@ (cond ((eq? #f val) NULL) ((string-null? val) - (if (eq? 1 (%PQgetisnull + (if (= 1 (%PQgetisnull (squee/unwrap-result-ptr result-ptr) row-i col-i)) NULL val)) diff --git a/guix-data-service/jobs.scm b/guix-data-service/jobs.scm index b045133..3ea1ebf 100644 --- a/guix-data-service/jobs.scm +++ b/guix-data-service/jobs.scm @@ -334,9 +334,9 @@ WHERE job_id = $1") "\n\n" (let ((running-jobs (hash-count (const #t) processes))) (cond - ((eq? running-jobs 0) + ((= running-jobs 0) "status: 0 running jobs") - ((eq? running-jobs 1) + ((= running-jobs 1) "status: 1 running job") (else (simple-format #f "status: ~A running jobs" @@ -363,7 +363,7 @@ WHERE job_id = $1") (match (hash-ref processes pid) ((_ (id)) (post-job id) - (unless (eq? status 0) + (unless (= status 0) (simple-format (current-error-port) "pid ~A (job: ~A) failed with status ~A\n" pid id status) diff --git a/guix-data-service/web/compare/html.scm b/guix-data-service/web/compare/html.scm index 5b624d1..9f89b78 100644 --- a/guix-data-service/web/compare/html.scm +++ b/guix-data-service/web/compare/html.scm @@ -250,7 +250,7 @@ string<?))) (map (lambda (lang index) `(tr - ,@(if (eq? index 0) + ,@(if (= index 0) `((td (@ (rowspan ,(length languages))) ,(case change ((new) "New") diff --git a/guix-data-service/web/revision/controller.scm b/guix-data-service/web/revision/controller.scm index 1f30c0b..b22fbed 100644 --- a/guix-data-service/web/revision/controller.scm +++ b/guix-data-service/web/revision/controller.scm @@ -1383,10 +1383,10 @@ (build-server-count (length build-servers))) (cond - ((or (eq? hash-count 0) - (eq? build-server-count 1)) + ((or (= hash-count 0) + (= build-server-count 1)) "unknown") - ((eq? hash-count 1) + ((= hash-count 1) "matching") ((> hash-count 1) "not-matching"))))))) diff --git a/guix-data-service/web/revision/html.scm b/guix-data-service/web/revision/html.scm index 8e46c54..412eb6e 100644 --- a/guix-data-service/web/revision/html.scm +++ b/guix-data-service/web/revision/html.scm @@ -272,7 +272,7 @@ git-repositories))) '()) ,@(if (> (vector-length licenses) 0) - `((dt ,(if (eq? (vector-length licenses) 1) + `((dt ,(if (= (vector-length licenses) 1) "License" "Licenses")) (dd (ul @@ -2082,10 +2082,10 @@ figure { (build-server-count (length build-servers))) (cond - ((or (eq? hash-count 0) - (eq? build-server-count 1)) + ((or (= hash-count 0) + (= build-server-count 1)) "Unknown") - ((eq? hash-count 1) + ((= hash-count 1) '(span (@ (class "text-success")) "Matching")) ((> hash-count 1) diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm index dd3c07f..480b066 100644 --- a/guix-data-service/web/view/html.scm +++ b/guix-data-service/web/view/html.scm @@ -725,7 +725,7 @@ "," "\"" ,(or hash "") "\"" ")" - ,@(if (eq? count-down 0) + ,@(if (= count-down 0) '() '(","))))) derivation-outputs @@ -763,7 +763,7 @@ ",") "]" ")" - ,@(if (eq? count-down 0) + ,@(if (= count-down 0) '() '(","))))) derivation-inputs @@ -789,7 +789,7 @@ (a (@ (href ,source)) ,(display-store-item source)) "\"" - ,@(if (eq? count-down 0) + ,@(if (= count-down 0) '() '(",")))) derivation-sources @@ -850,7 +850,7 @@ `(div "\"" ,(display-possible-store-item arg) "\"" - ,@(if (eq? count-down 0) + ,@(if (= count-down 0) '() '(",")))) args diff --git a/scripts/guix-data-service-process-branch-updated-mbox.in b/scripts/guix-data-service-process-branch-updated-mbox.in index 7205b7a..5773341 100644 --- a/scripts/guix-data-service-process-branch-updated-mbox.in +++ b/scripts/guix-data-service-process-branch-updated-mbox.in @@ -37,7 +37,7 @@ (lambda (conn) (let ((count (count-git-repositories-with-x-git-repo-header-values conn))) - (when (eq? count 0) + (when (= count 0) (display "\nerror: no git_repositories exist with a value for x_git_repo_header error: to match emails to repositories, the git_repositories entry must have |