search for: osinfo_read_db

Displaying 3 results from an estimated 3 matches for "osinfo_read_db".

2017 Jan 03
0
[PATCH 4/5] mllib: add libosinfo DB reading helpers
...e_duplicates ( + List.map ( + fun os_file -> + let file_path = os_path // os_file in + let xml = read_whole_file file_path in + let doc = Xml.parse_memory xml in + let xpathctx = Xml.xpath_new_context doc in + filter xpathctx + ) os_files + ) + +let osinfo_read_db filter = + let path = try + Sys.getenv "OSINFO_SYSTEM_DIR" + with Not_found -> "/usr/share/osinfo" in + + try osinfo_db_read_three_levels (path // "os") filter with + | _ -> + try osinfo_db_read_three_levels (osinfopath // "os") filter with +...
2017 Jan 03
13
[PATCH 0/5] Introducing virt-builder-repository
Hi all, I wanted to provide an easy way to create or update a virt-builder repository out of a folder of template disk image files. This is what virt-builder-repository aims at. Some of the data are computed from the image file, others are asked the user or extracted from an existing index file. So far, virt-builder-repository doesn't run libguestfs on each image to extract the architecture,
2017 Jan 03
0
[PATCH 5/5] Add a virt-builder-repository tool
...group 2 s) in + Utils.Rev_string (prefix ^ (string_of_int (suffix + 1))) + else + Utils.Rev_string (s ^ ".1") + +let osinfo_get_short_ids () = + let get_ids xpathctx = + xpath_string_default xpathctx "/libosinfo/os/short-id" "" in + + let ids = Osinfo.osinfo_read_db get_ids in + List.filter (fun id -> id <> "") ids + +let main () = + let cmdline = parse_cmdline () in + + (* If debugging, echo the command line arguments. *) + if verbose () then ( + printf "command line:"; + List.iter (printf " %s") (Array.to_list...