aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-08-10 21:34:17 +0100
committerChristopher Baines <mail@cbaines.net>2024-08-12 09:14:36 +0100
commiteeda1bf33b42a81a8a295c9e498f3bb44e95d6f1 (patch)
tree2e318ee92284412718f37798a1e22716f0c6855f /guix-data-service
parent4d0813c3318bf59eae485817ede6facd0d0b4eee (diff)
downloaddata-service-eeda1bf33b42a81a8a295c9e498f3bb44e95d6f1.tar
data-service-eeda1bf33b42a81a8a295c9e498f3bb44e95d6f1.tar.gz
Use system-ids for inserting distribution counts
Diffstat (limited to 'guix-data-service')
-rw-r--r--guix-data-service/jobs/load-new-guix-revision.scm3
-rw-r--r--guix-data-service/model/guix-revision-package-derivation.scm6
2 files changed, 3 insertions, 6 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm
index f9eb3f6..189b121 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -1974,7 +1974,8 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
(insert-guix-revision-package-derivation-distribution-counts
conn
guix-revision-id
- system
+ (number->string
+ (system->system-id conn system))
(or target "")))))
(let ((process-system-and-target/fiberized
diff --git a/guix-data-service/model/guix-revision-package-derivation.scm b/guix-data-service/model/guix-revision-package-derivation.scm
index 733cf34..6a1f7c4 100644
--- a/guix-data-service/model/guix-revision-package-derivation.scm
+++ b/guix-data-service/model/guix-revision-package-derivation.scm
@@ -49,7 +49,7 @@
(define (insert-guix-revision-package-derivation-distribution-counts
conn
guix-revision-id
- system
+ system-id
target)
(define (get-count-for-next-level system-id target level-counts)
@@ -148,10 +148,6 @@ VALUES ($1, $2, $3, $4, $5)"
(number->string level)
(number->string count))))
- (define system-id
- (number->string
- (system->system-id conn system)))
-
(let loop ((level-counts '()))
(let ((level (length level-counts))
(count (get-count-for-next-level system-id target level-counts)))