Add a few new pages
For showing more information about builds, revisions and derivations.
This commit is contained in:
parent
e656b0967b
commit
b0eaf9cf7a
3 changed files with 131 additions and 0 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#:use-module (guix inferior)
|
||||
#:use-module (guix-data-service model utils)
|
||||
#:export (select-existing-package-entries
|
||||
select-packages-in-revision
|
||||
insert-into-package-entries
|
||||
inferior-packages->package-ids))
|
||||
|
||||
|
|
@ -28,6 +29,20 @@
|
|||
"packages.derivation_id = vals.derivation_id"
|
||||
";"))
|
||||
|
||||
(define (select-packages-in-revision conn commit-hash)
|
||||
(define query
|
||||
(string-append
|
||||
"SELECT packages.name, packages.version, packages.derivation_id "
|
||||
"FROM packages "
|
||||
"INNER JOIN guix_revision_packages"
|
||||
" ON packages.id = guix_revision_packages.package_id "
|
||||
"INNER JOIN guix_revisions"
|
||||
" ON guix_revision_packages.revision_id = guix_revisions.id "
|
||||
"WHERE guix_revisions.commit = $1 "
|
||||
"ORDER BY packages.name, packages.version"))
|
||||
|
||||
(exec-query conn query (list commit-hash)))
|
||||
|
||||
(define (insert-into-package-entries package-entries)
|
||||
(string-append "INSERT INTO packages "
|
||||
"(name, version, package_metadata_id, derivation_id) VALUES "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue