Insert channel news entries when loading new guix revisions

If the channel-news-for-commit function is present.
This commit is contained in:
Christopher Baines 2019-11-18 19:49:12 +00:00
parent 2e8ca7f547
commit f23ee71ea7
2 changed files with 40 additions and 16 deletions

View file

@ -17,6 +17,7 @@
#:use-module (guix build utils)
#:use-module (guix-data-service config)
#:use-module (guix-data-service database)
#:use-module (guix-data-service model channel-news)
#:use-module (guix-data-service model package)
#:use-module (guix-data-service model git-repository)
#:use-module (guix-data-service model guix-revision)
@ -1047,6 +1048,15 @@ ORDER BY packages.name, packages.version"
commit store-item)))
(and
guix-revision-id
(if (defined? 'channel-news-for-commit)
(insert-channel-news-entries-for-guix-revision
conn
guix-revision-id
(channel-news-for-commit channel-for-commit commit))
(begin
(simple-format #t "debug: importing channel news not supported\n")
#t))
(extract-information-from conn guix-revision-id
commit store-item)
(update-package-versions-table conn git-repository-id commit)