From ea761df6875b2fa7fd9fcd3bc4c5b43812a426dd Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 9 Jan 2015 11:14:35 +0100 Subject: [PATCH] builder: export the "osinfo" attribute to json Thanks to: Federico Simoncelli. --- builder/list_entries.ml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/builder/list_entries.ml b/builder/list_entries.ml index 3d9938691..45c7e8be6 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -118,6 +118,7 @@ and list_entries_json ~sources index = compressed_size = compressed_size; notes = notes; aliases = aliases; + osinfo = osinfo; hidden = hidden }) -> let item = [ "os-version", JSON.String name ] in let item = @@ -148,6 +149,10 @@ and list_entries_json ~sources index = | Some l -> let l = List.map (fun x -> JSON.String x) l in ("aliases", JSON.List l) :: item in + let item = + match osinfo with + | None -> item + | Some str -> ("osinfo", JSON.String str) :: item in let item = ("hidden", JSON.Bool hidden) :: item in JSON.Dict (List.rev item) ) index in