Add a new page comparing the derivations of two revisions

This commit is contained in:
Christopher Baines 2019-02-24 15:38:08 +00:00
parent a5cc703e18
commit e68142cf91
Signed by: cbaines
GPG key ID: 5E28A33B0B84F577
3 changed files with 89 additions and 7 deletions

View file

@ -7,7 +7,7 @@
#:use-module (guix-data-service model derivation)
#:export (package-data->package-data-vhashes
package-differences-data
package-data-vhashes->derivations
package-data-vhash->derivations
package-data-vhashes->new-packages
package-data-vhashes->removed-packages
package-data-version-changes
@ -47,9 +47,7 @@ ORDER BY base_packages.name, base_packages.version, target_packages.name, target
(list vlist-null vlist-null)
package-data)))
(define (package-data-vhashes->derivations conn
base-packages-vhash
target-packages-vhash)
(define (package-data-vhash->derivations conn packages-vhash)
(define (vhash->derivation-ids vhash)
(vhash-fold (lambda (key value result)
(cons (third value)
@ -58,9 +56,7 @@ ORDER BY base_packages.name, base_packages.version, target_packages.name, target
vhash))
(let* ((derivation-ids
(delete-duplicates
(append (vhash->derivation-ids base-packages-vhash)
(vhash->derivation-ids target-packages-vhash))))
(vhash->derivation-ids packages-vhash))
(derivation-data
(select-derivations-by-id conn derivation-ids)))
derivation-data))