Extract out creating the guix-revision from extract-information-from
To allow for using the guix-revision-id when inserting channel news entries.
This commit is contained in:
parent
3ef99acc79
commit
2e8ca7f547
1 changed files with 37 additions and 37 deletions
|
|
@ -741,7 +741,7 @@ WHERE job_id = $1"
|
||||||
|
|
||||||
output)))
|
output)))
|
||||||
|
|
||||||
(define (extract-information-from conn git-repository-id commit store-path)
|
(define (extract-information-from conn guix-revision-id commit store-path)
|
||||||
(simple-format
|
(simple-format
|
||||||
#t "debug: extract-information-from: ~A\n" store-path)
|
#t "debug: extract-information-from: ~A\n" store-path)
|
||||||
(with-store store
|
(with-store store
|
||||||
|
|
@ -854,39 +854,35 @@ WHERE job_id = $1"
|
||||||
#t "debug: finished loading information from inferior\n")
|
#t "debug: finished loading information from inferior\n")
|
||||||
(close-inferior inf)
|
(close-inferior inf)
|
||||||
|
|
||||||
(let ((guix-revision-id
|
(when inferior-lint-warnings
|
||||||
(insert-guix-revision conn git-repository-id
|
(let* ((lint-checker-ids
|
||||||
commit store-path)))
|
(lint-checkers->lint-checker-ids
|
||||||
|
conn
|
||||||
|
(map car inferior-lint-warnings)))
|
||||||
|
(lint-warning-ids
|
||||||
|
(insert-lint-warnings
|
||||||
|
conn
|
||||||
|
inferior-package-id->package-database-id
|
||||||
|
lint-checker-ids
|
||||||
|
inferior-lint-warnings)))
|
||||||
|
(insert-guix-revision-lint-checkers conn
|
||||||
|
guix-revision-id
|
||||||
|
lint-checker-ids)
|
||||||
|
|
||||||
(when inferior-lint-warnings
|
(insert-guix-revision-lint-warnings conn
|
||||||
(let* ((lint-checker-ids
|
guix-revision-id
|
||||||
(lint-checkers->lint-checker-ids
|
lint-warning-ids)))
|
||||||
conn
|
(let ((package-derivation-ids
|
||||||
(map car inferior-lint-warnings)))
|
(inferior-data->package-derivation-ids
|
||||||
(lint-warning-ids
|
conn inf inferior-package-id->package-database-id
|
||||||
(insert-lint-warnings
|
inferior-data-4-tuples)))
|
||||||
conn
|
|
||||||
inferior-package-id->package-database-id
|
|
||||||
lint-checker-ids
|
|
||||||
inferior-lint-warnings)))
|
|
||||||
(insert-guix-revision-lint-checkers conn
|
|
||||||
guix-revision-id
|
|
||||||
lint-checker-ids)
|
|
||||||
|
|
||||||
(insert-guix-revision-lint-warnings conn
|
(insert-guix-revision-package-derivations conn
|
||||||
guix-revision-id
|
guix-revision-id
|
||||||
lint-warning-ids)))
|
package-derivation-ids)
|
||||||
(let ((package-derivation-ids
|
(simple-format
|
||||||
(inferior-data->package-derivation-ids
|
#t "Successfully loaded ~A package/derivation pairs\n"
|
||||||
conn inf inferior-package-id->package-database-id
|
(length package-derivation-ids)))))
|
||||||
inferior-data-4-tuples)))
|
|
||||||
|
|
||||||
(insert-guix-revision-package-derivations conn
|
|
||||||
guix-revision-id
|
|
||||||
package-derivation-ids)
|
|
||||||
(simple-format
|
|
||||||
#t "Successfully loaded ~A package/derivation pairs\n"
|
|
||||||
(length package-derivation-ids))))))
|
|
||||||
#t)
|
#t)
|
||||||
(lambda (key . args)
|
(lambda (key . args)
|
||||||
(simple-format (current-error-port)
|
(simple-format (current-error-port)
|
||||||
|
|
@ -1046,11 +1042,15 @@ ORDER BY packages.name, packages.version"
|
||||||
(store-item
|
(store-item
|
||||||
(store-item-for-channel conn channel-for-commit)))
|
(store-item-for-channel conn channel-for-commit)))
|
||||||
(if store-item
|
(if store-item
|
||||||
(and
|
(let ((guix-revision-id
|
||||||
(extract-information-from conn git-repository-id
|
(insert-guix-revision conn git-repository-id
|
||||||
commit store-item)
|
commit store-item)))
|
||||||
(update-package-versions-table conn git-repository-id commit)
|
(and
|
||||||
(update-package-derivations-table conn git-repository-id commit))
|
guix-revision-id
|
||||||
|
(extract-information-from conn guix-revision-id
|
||||||
|
commit store-item)
|
||||||
|
(update-package-versions-table conn git-repository-id commit)
|
||||||
|
(update-package-derivations-table conn git-repository-id commit)))
|
||||||
(begin
|
(begin
|
||||||
(simple-format #t "Failed to generate store item for ~A\n"
|
(simple-format #t "Failed to generate store item for ~A\n"
|
||||||
commit)
|
commit)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue