Include output information in the package page response
As this will be useful for QA to say whether the package builds reproducibly or not.
This commit is contained in:
parent
c3cb04cb80
commit
03327c0cc3
3 changed files with 62 additions and 8 deletions
|
|
@ -44,6 +44,7 @@
|
||||||
select-derivation-by-file-name
|
select-derivation-by-file-name
|
||||||
select-derivation-by-file-name-hash
|
select-derivation-by-file-name-hash
|
||||||
select-derivation-outputs-by-derivation-id
|
select-derivation-outputs-by-derivation-id
|
||||||
|
select-derivation-outputs-by-derivation-file-name
|
||||||
select-derivation-sources-by-derivation-id
|
select-derivation-sources-by-derivation-id
|
||||||
select-derivation-references-by-derivation-id
|
select-derivation-references-by-derivation-id
|
||||||
select-derivation-source-file-by-store-path
|
select-derivation-source-file-by-store-path
|
||||||
|
|
@ -1158,6 +1159,31 @@ ORDER BY derivation_outputs.name"))
|
||||||
(string=? recursive "t"))))
|
(string=? recursive "t"))))
|
||||||
(exec-query conn query (list (number->string id)))))
|
(exec-query conn query (list (number->string id)))))
|
||||||
|
|
||||||
|
(define (select-derivation-outputs-by-derivation-file-name conn file-name)
|
||||||
|
(define query
|
||||||
|
(string-append
|
||||||
|
"
|
||||||
|
SELECT derivation_outputs.name, derivation_output_details.path,
|
||||||
|
derivation_output_details.hash_algorithm, derivation_output_details.hash,
|
||||||
|
derivation_output_details.recursive
|
||||||
|
FROM derivation_outputs
|
||||||
|
INNER JOIN derivation_output_details ON
|
||||||
|
derivation_outputs.derivation_output_details_id = derivation_output_details.id
|
||||||
|
INNER JOIN derivations
|
||||||
|
ON derivation_outputs.derivation_id = derivations.id
|
||||||
|
WHERE derivations.file_name = $1
|
||||||
|
ORDER BY derivation_outputs.name"))
|
||||||
|
|
||||||
|
(map
|
||||||
|
(match-lambda
|
||||||
|
((name path hash_algorithm hash recursive)
|
||||||
|
(list name
|
||||||
|
path
|
||||||
|
hash_algorithm
|
||||||
|
hash
|
||||||
|
(string=? recursive "t"))))
|
||||||
|
(exec-query conn query (list file-name))))
|
||||||
|
|
||||||
(define (select-derivation-inputs-by-derivation-id conn id)
|
(define (select-derivation-inputs-by-derivation-id conn id)
|
||||||
(define query
|
(define query
|
||||||
(string-append
|
(string-append
|
||||||
|
|
|
||||||
|
|
@ -927,11 +927,38 @@
|
||||||
locale)))
|
locale)))
|
||||||
(derivations
|
(derivations
|
||||||
(with-resource-from-pool (connection-pool) conn
|
(with-resource-from-pool (connection-pool) conn
|
||||||
|
(map
|
||||||
|
(lambda (derivation-details)
|
||||||
|
(append
|
||||||
|
derivation-details
|
||||||
|
(list
|
||||||
|
(map
|
||||||
|
(match-lambda
|
||||||
|
((name path hash-algorithm hash recursive?)
|
||||||
|
`((name . ,name)
|
||||||
|
(path . ,path)
|
||||||
|
(hash_algorithm . ,hash-algorithm)
|
||||||
|
(hash . ,hash)
|
||||||
|
(recursive? . ,recursive?)
|
||||||
|
(nars
|
||||||
|
. ,(list->vector
|
||||||
|
(map (match-lambda
|
||||||
|
((hash-algorithm hash size
|
||||||
|
urls signatures)
|
||||||
|
`((hash . ((algorithm . ,hash-algorithm)
|
||||||
|
(value . ,hash)))
|
||||||
|
(size . ,size))))
|
||||||
|
(select-nars-for-output
|
||||||
|
conn
|
||||||
|
path)))))))
|
||||||
|
(select-derivation-outputs-by-derivation-file-name
|
||||||
|
conn
|
||||||
|
(third derivation-details))))))
|
||||||
(select-derivations-by-revision-name-and-version
|
(select-derivations-by-revision-name-and-version
|
||||||
conn
|
conn
|
||||||
commit-hash
|
commit-hash
|
||||||
name
|
name
|
||||||
version)))
|
version))))
|
||||||
(git-repositories
|
(git-repositories
|
||||||
(with-resource-from-pool (connection-pool) conn
|
(with-resource-from-pool (connection-pool) conn
|
||||||
(git-repositories-containing-commit conn
|
(git-repositories-containing-commit conn
|
||||||
|
|
@ -959,10 +986,11 @@
|
||||||
(home-page . ,home-page))))
|
(home-page . ,home-page))))
|
||||||
(derivations . ,(list->vector
|
(derivations . ,(list->vector
|
||||||
(map (match-lambda
|
(map (match-lambda
|
||||||
((system target file-name status)
|
((system target file-name status outputs)
|
||||||
`((system . ,system)
|
`((system . ,system)
|
||||||
(target . ,target)
|
(target . ,target)
|
||||||
(derivation . ,file-name))))
|
(derivation . ,file-name)
|
||||||
|
(outputs . ,(list->vector outputs)))))
|
||||||
derivations))))
|
derivations))))
|
||||||
#:extra-headers http-headers-for-unchanging-content))
|
#:extra-headers http-headers-for-unchanging-content))
|
||||||
(else
|
(else
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,7 @@
|
||||||
(tbody
|
(tbody
|
||||||
,@(map
|
,@(map
|
||||||
(match-lambda
|
(match-lambda
|
||||||
((system target file-name builds)
|
((system target file-name builds outputs)
|
||||||
`(tr
|
`(tr
|
||||||
(td (samp ,system))
|
(td (samp ,system))
|
||||||
(td (samp ,target))
|
(td (samp ,target))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue