Fix data input for package-metadata
Represent non-string home pages as NULL, and delete duplicates, as package metadata entries can be duplicated.
This commit is contained in:
parent
4c67160b92
commit
2cb389037b
1 changed files with 15 additions and 2 deletions
|
|
@ -148,5 +148,18 @@ WHERE packages.id IN (
|
||||||
conn
|
conn
|
||||||
"package_metadata"
|
"package_metadata"
|
||||||
'(synopsis description home_page location_id license_set_id)
|
'(synopsis description home_page location_id license_set_id)
|
||||||
package-metadata))
|
(map (match-lambda
|
||||||
|
((synopsis description home-page location-id license-set-id)
|
||||||
|
(list synopsis
|
||||||
|
description
|
||||||
|
(if (string? home-page)
|
||||||
|
home-page
|
||||||
|
NULL)
|
||||||
|
location-id
|
||||||
|
license-set-id)))
|
||||||
|
package-metadata)
|
||||||
|
;; There can be duplicated entires in package-metadata, for example where
|
||||||
|
;; you have one package definition which interits from another, and just
|
||||||
|
;; overrides the version and the source, the package_metadata entries for
|
||||||
|
;; both definitions will be the same.
|
||||||
|
#:delete-duplicates? #t))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue