search for: fold_right

Displaying 20 results from an estimated 35 matches for "fold_right".

2012 May 18
1
[PATCH] sysprep: remove kerberos data in the guest
...ype root in + if typ <> "windows" then ( + let excepts = [ "/var/kerberos/krb5kdc/kadm5.acl"; + "/var/kerberos/krb5kdc/kdc.conf"; ] in + let paths = Array.to_list (g#glob_expand "/var/kerberos/krb5kdc/*") in + let set = List.fold_right StringSet.add paths StringSet.empty in + let excepts = List.fold_right StringSet.add excepts StringSet.empty in + let set = StringSet.diff set excepts in + StringSet.iter ( + fun filename -> + try g#rm filename with G.Error _ -> () + ) set; + + [] + ) + else [] +...
2014 Mar 20
3
[PATCH 1/2] builder: allow the index parser to parse files with no sections
Gracefully handle files with no sections; extend the validate.sh test to try to validate an empty file. --- builder/index-parse.y | 2 ++ builder/website/validate.sh | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/builder/index-parse.y b/builder/index-parse.y index 9355bd4..5133959 100644 --- a/builder/index-parse.y +++ b/builder/index-parse.y @@ -108,6 +108,8 @@ sections:
2012 May 09
2
[PATCH 1/2] sysprep: remove ca certificates in the guest
Remove the ca certificates. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- sysprep/Makefile.am | 2 + sysprep/sysprep_operation_ca_certificates.ml | 62 ++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 sysprep/sysprep_operation_ca_certificates.ml diff --git a/sysprep/Makefile.am b/sysprep/Makefile.am index
2014 Apr 22
3
[PATCH 1/2] builder: add an optional suffix string for INI parsing errors
--- builder/index-parse.y | 6 ++++-- builder/index-parser-c.c | 3 ++- builder/index-struct.h | 1 + builder/ini_reader.ml | 6 +++--- builder/ini_reader.mli | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/builder/index-parse.y b/builder/index-parse.y index 310870d..7ddef53 100644 --- a/builder/index-parse.y +++ b/builder/index-parse.y @@ -150,12 +150,14 @@
2017 Oct 08
0
[PATCH v2 1/4] common/mlstdutils: Extend the List module.
...'a list -> 'b list + val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list + val rev_map : ('a -> 'b) -> 'a list -> 'b list + val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a + val fold_right : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b + val iter2 : ('a -> 'b -> unit) -> 'a list -> 'b list -> unit + val map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list + val rev_map...
2014 Oct 10
0
[PATCH 3/3] builder: use the JSON module
...("size", JSON.Int64 size) :: item in + let item = + match compressed_size with + | None -> item + | Some n -> ("compressed-size", JSON.String (Int64.to_string n)) :: item in + let item = + let json_notes = + List.fold_right ( + fun (lang, langnotes) acc -> + let lang = + match lang with + | "" -> "C" + | x -> x in + (lang, JSON.String langnotes) :: acc + ) notes [] in + if List...
2014 Feb 25
12
[PATCH 0/8] virt-builder: use .conf files for configuration
Hi, attached there is a serie of patches that completes the work on making virt-builder use .conf files, shipped in XDG directories, to configure all the available sources of indexes used. This also removes the hardcoded default location, replaced now with a configuration file (which may be not used at all). Thanks, Pino Toscano (8): builder: allow "no key" as key in Sigchecker
2014 Mar 19
7
[PATCH 1/3] builder: make the C index parser reentrant
Switch the lex/yacc parser into reentrant mode, to ease the handling of parsing-specific data; introduce a new parser_context struct for that, which is added as extra data to the parser. This should cause no behaviour changes in the parsing, just no more global variables used for getting data in/out the parser. --- builder/index-parse.y | 44 ++++++++++++++++++++++++++++++++++++------
2014 Oct 10
4
[PATCH 1/3] Move JSON to mllib
Move the simple OCaml JSON writer to mllib, so that can be enhanced and used also outside v2v. --- mllib/JSON.ml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ mllib/JSON.mli | 26 ++++++++++++++++++++++++++ mllib/Makefile.am | 5 ++++- po/POTFILES-ml | 2 +- v2v/JSON.ml | 53 ----------------------------------------------------- v2v/JSON.mli | 26
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 Apr 12
0
[PATCH v6 10/10] Add a virt-builder-repository tool
..."); + exit 0 + ); + + info (f_ "Found new images: %s") (String.concat " " images); + + let outindex_path = tmprepo // "index" in + let index_channel = open_out outindex_path in + + (* Generate entries for uncompressed images *) + let images_entries = List.fold_right ( + fun filename acc -> + let image_entry = process_image acc filename cmdline.repo tmprepo + index cmdline.interactive cmdline.no_compression + sigchecker in + image_entry :: acc + ) images [] in + + (* Fil...
2017 Jun 19
0
[PATCH v7 9/9] Add a virt-builder-repository tool
..."); + exit 0 + ); + + info (f_ "Found new images: %s") (String.concat " " images); + + let outindex_path = tmprepo // "index" in + let index_channel = open_out outindex_path in + + (* Generate entries for uncompressed images *) + let images_entries = List.fold_right ( + fun filename acc -> + let image_entry = process_image acc filename cmdline.repo tmprepo + index cmdline.interactive cmdline.no_compression + sigchecker in + image_entry :: acc + ) images [] in + + (* Fil...
2017 Sep 18
0
[PATCH v9 7/7] New tool: virt-builder-repository
..."); + exit 0 + ); + + info (f_ "Found new images: %s") (String.concat " " images); + + let outindex_path = tmprepo // "index" in + let index_channel = open_out outindex_path in + + (* Generate entries for uncompressed images *) + let images_entries = List.fold_right ( + fun filename acc -> + let image_entry = process_image acc filename cmdline.repo tmprepo + index cmdline.interactive cmdline.no_compression + sigchecker in + image_entry :: acc + ) images [] in + + (* Fil...
2017 Oct 05
0
[PATCH v11 6/6] New tool: virt-builder-repository
..."); + exit 0 + ); + + info (f_ "Found new images: %s") (String.concat " " images); + + let outindex_path = tmprepo // "index" in + let index_channel = open_out outindex_path in + + (* Generate entries for uncompressed images *) + let images_entries = List.fold_right ( + fun filename acc -> + let image_entry = process_image acc + filename + cmdline.repo + tmprepo + index +...
2017 Sep 12
0
[PATCH v8 7/7] Add a virt-builder-repository tool
..."); + exit 0 + ); + + info (f_ "Found new images: %s") (String.concat " " images); + + let outindex_path = tmprepo // "index" in + let index_channel = open_out outindex_path in + + (* Generate entries for uncompressed images *) + let images_entries = List.fold_right ( + fun filename acc -> + let image_entry = process_image acc filename cmdline.repo tmprepo + index cmdline.interactive cmdline.no_compression + sigchecker in + image_entry :: acc + ) images [] in + + (* Fil...
2014 Sep 17
4
[PATCH 0/2] supermin: use librpm for rpm support
Hi, this work makes supermin use the rpm library instead of invoking rpm directly. This, together with a needed refactoring of the dependency resolution, should help in make supermin faster on rpm-based systems. Surely the patches will still need polishing, especially for behaviours of newly added stuff, but at least it's a good starting point. Noting that you need rpm-devel on most of rpm
2017 Nov 13
0
[PATCH v12 3/3] New tool: virt-builder-repository
..."); + exit 0 + ); + + info (f_ "Found new images: %s") (String.concat " " images); + + let outindex_path = tmprepo // "index" in + let index_channel = open_out outindex_path in + + (* Generate entries for uncompressed images *) + let images_entries = List.fold_right ( + fun filename acc -> + let image_entry = process_image acc + filename + cmdline.repo + tmprepo + index +...
2016 May 22
0
[PATCH 2/2] ocaml tools: Use a common debug function.
...StringSet = Set.Make (String) let parse_conf file = - if verbose () then ( - printf (f_"%s: trying to read %s\n") prog file; - ); + debug "trying to read %s" file; let sections = Ini_reader.read_ini ~error_suffix:"[ignored]" file in let sources = List.fold_right ( @@ -55,20 +53,16 @@ let parse_conf file = try Some (URI.parse_uri (List.assoc ("gpgkey", None) fields)) with | Not_found -> None | Invalid_argument "URI.parse_uri" as ex -> - if verbose () then ( - printf...
2016 May 22
4
ocaml tools: Use a common debug function.
Add a Common_utils.debug function for printing messages only when in verbose mode. Rich.
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