aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/model/package-metadata.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix-data-service/model/package-metadata.scm')
-rw-r--r--guix-data-service/model/package-metadata.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/guix-data-service/model/package-metadata.scm b/guix-data-service/model/package-metadata.scm
index e753dea..f2319fc 100644
--- a/guix-data-service/model/package-metadata.scm
+++ b/guix-data-service/model/package-metadata.scm
@@ -27,10 +27,12 @@
#:use-module (guix packages)
#:use-module (guix i18n)
#:use-module (guix inferior)
+ #:use-module (guix-data-service utils)
#:use-module (guix-data-service model location)
#:use-module (guix-data-service model utils)
#:export (select-package-metadata-by-revision-name-and-version
inferior-packages->package-metadata-ids
+ inferior-packages->translated-package-descriptions-and-synopsis
package-description-and-synopsis-locale-options-guix-revision))
@@ -203,9 +205,9 @@ WHERE packages.id IN (
";"))
(define (inferior-packages->translated-package-descriptions-and-synopsis inferior
- inferior-package-id)
+ inferior-package)
- (define (translate inferior-package)
+ (define (translate inferior-package-id)
`(let* ((package (hashv-ref %package-table ,inferior-package-id))
(source-locale "en_US.utf8")
(source-synopsis
@@ -260,7 +262,9 @@ WHERE packages.id IN (
(cons (cons source-locale source-synopsis)
synopsis-by-locale))))
- (inferior-eval (translate inferior-package-id) inferior))
+ (inferior-eval (translate (inferior-package-id inferior-package)) inferior))
+
+(prevent-inlining-for-tests inferior-packages->translated-package-descriptions-and-synopsis)
(define (package-synopsis-data->package-synopsis-ids
conn synopsis-by-locale)
@@ -366,7 +370,7 @@ WHERE packages.id IN (
(map (lambda (package license-set-id)
(let ((translated-package-descriptions-and-synopsis
(inferior-packages->translated-package-descriptions-and-synopsis
- inferior (inferior-package-id package))))
+ inferior package)))
(list (non-empty-string-or-false
(inferior-package-home-page package))
(location->location-id