search for: iterate_db

Displaying 13 results from an estimated 13 matches for "iterate_db".

2017 Sep 14
1
Re: [PATCH v8 1/7] ocaml osinfo database iterator
On Tuesday, 12 September 2017 09:03:08 CEST Cédric Bosdonnat wrote: > From: Pino Toscano <ptoscano@redhat.com> > > The C osinfo database parser has been deprecated, reimplement the base > of it in ocaml for virt-builder-repository to use. This provides an > Osinfo.iterate_db() function traversing the files of the osinfo database > and calling a function on each of them. > --- Since I contributed this bit, I guess I can provide also a commit message: builder: add simple OCaml osinfo-db reader Add a simple OCaml-based implementation of reader of the osinfo-d...
2017 Oct 09
1
Re: [PATCH v11 6/6] New tool: virt-builder-repository
...nothing from this function", then make the function return an option type. > +let osinfo_ids = ref None > + > +let osinfo_get_short_ids () = > + match !osinfo_ids with > + | Some ids -> ids > + | None -> ( > + let set = ref StringSet.empty in > + Osinfo.iterate_db ( > + fun filepath -> > + let doc = Xml.parse_file filepath in > + let xpathctx = Xml.xpath_new_context doc in > + let nodes = xpath_get_nodes xpathctx "/libosinfo/os/short-id" in > + List.iter ( > + fun node -> > +...
2017 Sep 12
0
[PATCH v8 1/7] ocaml osinfo database iterator
From: Pino Toscano <ptoscano@redhat.com> The C osinfo database parser has been deprecated, reimplement the base of it in ocaml for virt-builder-repository to use. This provides an Osinfo.iterate_db() function traversing the files of the osinfo database and calling a function on each of them. --- .gitignore | 1 + builder/Makefile.am | 4 +++ builder/osinfo.ml | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++ builder/osinfo.mli | 22 +++++++++++++++ 4 files changed, 10...
2017 Sep 18
0
[PATCH v9 1/7] ocaml osinfo database iterator
From: Pino Toscano <ptoscano@redhat.com> The C osinfo database parser has been deprecated, reimplement the base of it in ocaml for virt-builder-repository to use. This provides an Osinfo.iterate_db() function traversing the files of the osinfo database and calling a function on each of them. --- .gitignore | 1 + builder/Makefile.am | 4 +++ builder/osinfo.ml | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++ builder/osinfo.mli | 22 +++++++++++++++ 4 files changed, 10...
2017 Sep 20
0
[PATCH v10 1/6] builder: add simple OCaml osinfo-db reader
...tails. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +open Std_utils +open Common_utils +open Osinfo_config + +let rec iterate_db fn = + let locations = ref [] in + + (* (1) Try the shared osinfo directory, using either the + * $OSINFO_SYSTEM_DIR envvar or its default value. + *) + let () = + let dir = + try Sys.getenv "OSINFO_SYSTEM_DIR" + with Not_found -> "/usr/share/osinfo" in +...
2017 Oct 05
0
[PATCH v11 1/6] builder: add simple OCaml osinfo-db reader
...etails. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +open Std_utils +open Tools_utils +open Osinfo_config + +let rec iterate_db fn = + let locations = ref [] in + + (* (1) Try the shared osinfo directory, using either the + * $OSINFO_SYSTEM_DIR envvar or its default value. + *) + let () = + let dir = + try Sys.getenv "OSINFO_SYSTEM_DIR" + with Not_found -> "/usr/share/osinfo" in +...
2017 Sep 12
10
[PATCH v8 0/7] virt-builder-repository tool
Hi all, Here is the latest iteration on the virt-builder-repository series. Diffs to previous version are: fixing things mentioned by Pino, integrate Pino's osinfo ocaml iterator and adding a check of the mime type to filter potential image files. Cédric Bosdonnat (6): builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry
2017 Oct 05
14
[PATCH v11 0/6] virt-builder-repository
Hi there, This is an update of the series. Just to rebase it on top of Rich's latest changes. Cédric Bosdonnat (5): builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function mllib: add XPath helper xpath_get_nodes() New tool: virt-builder-repository Pino Toscano (1): builder: add simple OCaml osinfo-db reader
2017 Sep 18
11
[PATCH v9 0/7] virt-builder-repository
Hi there, Diffs to v8: * Remove the regex to increment the revision: Index_parser.get_entry() only handles integers * Fix Pino's comments Cédric Bosdonnat (6): builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function mllib: add XPath helper xpath_get_nodes() builder: remove useless fish dependency New tool:
2017 Sep 20
6
[PATCH v10 0/6] virt-builder-repository
Hi all, Diff to v9 includes the changes requested by Pino. Cédric Bosdonnat (5): builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function mllib: add XPath helper xpath_get_nodes() New tool: virt-builder-repository Pino Toscano (1): builder: add simple OCaml osinfo-db reader .gitignore
2017 Sep 18
0
[PATCH v9 7/7] New tool: virt-builder-repository
...A512 _ -> true + | _ -> false + ) csums + with Not_found -> Checksums.SHA512 "" + +let osinfo_ids = ref None + +let osinfo_get_short_ids () = + match !osinfo_ids with + | Some ids -> ids + | None -> ( + let set = ref StringSet.empty in + Osinfo.iterate_db ( + fun filepath -> + let doc = Xml.parse_file filepath in + let xpathctx = Xml.xpath_new_context doc in + let nodes = xpath_get_nodes xpathctx "/libosinfo/os/short-id" in + List.iter ( + fun node -> + let id = Xml.node_as_string...
2017 Oct 05
0
[PATCH v11 6/6] New tool: virt-builder-repository
...A512 _ -> true + | _ -> false + ) csums + with Not_found -> Checksums.SHA512 "" + +let osinfo_ids = ref None + +let osinfo_get_short_ids () = + match !osinfo_ids with + | Some ids -> ids + | None -> ( + let set = ref StringSet.empty in + Osinfo.iterate_db ( + fun filepath -> + let doc = Xml.parse_file filepath in + let xpathctx = Xml.xpath_new_context doc in + let nodes = xpath_get_nodes xpathctx "/libosinfo/os/short-id" in + List.iter ( + fun node -> + let id = Xml.node_as_string...
2017 Sep 12
0
[PATCH v8 7/7] Add a virt-builder-repository tool
...A512 _ -> true + | _ -> false + ) csums + with Not_found -> Checksums.SHA512 "" + +let osinfo_ids = ref None + +let osinfo_get_short_ids () = + match !osinfo_ids with + | Some ids -> ids + | None -> ( + let set = ref StringSet.empty in + Osinfo.iterate_db ( + fun filepath -> + let doc = Xml.parse_file filepath in + let xpathctx = Xml.xpath_new_context doc in + let nodes = xpath_get_nodes xpathctx "/libosinfo/os/short-id" in + List.iter ( + fun node -> + let id = Xml.node_as_string...