Use system-ids for inserting distribution counts

This commit is contained in:
Christopher Baines 2024-08-10 21:34:17 +01:00
parent 4d0813c331
commit eeda1bf33b
2 changed files with 3 additions and 6 deletions

View file

@ -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

View file

@ -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)))