search for: list_entries_short

Displaying 20 results from an estimated 24 matches for "list_entries_short".

2014 Jan 30
2
[PATCH] builder: remove unused variables
Leftovers of the list_entries_short+list_entries_long split done in 91aae893c70b3877b31803800ba77836fd7a45e8. --- builder/list_entries.ml | 3 --- 1 file changed, 3 deletions(-) diff --git a/builder/list_entries.ml b/builder/list_entries.ml index 2f47231..80a309d 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@...
2016 Jul 18
0
[PATCH 3/3] builder: improve the handling of list formats
...ong"; "json" ] + +let list_format_of_string = function + | "short" -> Short + | "long" -> Long + | "json" -> Json + | fmt -> invalid_arg fmt + let rec list_entries ~list_format ~sources index = match list_format with - | `Short -> list_entries_short index - | `Long -> list_entries_long ~sources index - | `Json -> list_entries_json ~sources index + | Short -> list_entries_short index + | Long -> list_entries_long ~sources index + | Json -> list_entries_json ~sources index and list_entries_short index = List.iter ( diff...
2016 Jul 18
4
[PATCH 1/3] mllib: Getopt: point to man page as additional help
On error, point also to the man page of the current tool in addition to '$TOOL --help'. --- mllib/getopt-c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mllib/getopt-c.c b/mllib/getopt-c.c index bf40f91..3efd5d3 100644 --- a/mllib/getopt-c.c +++ b/mllib/getopt-c.c @@ -69,8 +69,8 @@ cleanup_option_list (void *ptr) static void __attribute__((noreturn))
2014 Jan 16
5
[PATCH 0/3] Add JSON output for virt-builder
Hi, This small patch serie adds a JSON output for virt-builder. This way it is possible to parse the list of available templates, with no need to parse the unstructured and possibly changing short and long outputs of virt-builder. Pino Toscano (3): builder: small refactor of the list output builder: add --list-format builder: add a JSON output for --list builder/builder.ml
2014 Jan 16
0
[PATCH 3/3] builder: add a JSON output for --list
...^ s_"Set memory size"; diff --git a/builder/list_entries.ml b/builder/list_entries.ml index 97ab201..7369e6c 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -25,6 +25,7 @@ let rec list_entries ~list_format ~sources index = match list_format with | `Short -> list_entries_short index | `Long -> list_entries_long ~sources index + | `Json -> list_entries_json ~sources index and list_entries_short index = List.iter ( @@ -78,3 +79,62 @@ and list_entries_long ~sources index = printf "\n" ) ) index + +and list_entries_json ~sources i...
2014 Mar 11
3
[PATCH 1/2] builder: move some language-related code into a Languages module
...in - (match territory with - | "" -> () - | territory -> l := (lang ^ "_" ^ territory) :: !l); - l := lang :: !l; - ); - l := "" :: !l; - List.rev !l - let rec list_entries ~list_format ~sources index = match list_format with | `Short -> list_entries_short index @@ -60,9 +42,7 @@ and list_entries_short index = ) index and list_entries_long ~sources index = - let langs = match Setlocale.setlocale Setlocale.LC_MESSAGES None with - | None -> [""] - | Some locale -> split_locale locale in + let langs = Languages.languages () in...
2014 Jan 30
0
Re: [PATCH] builder: remove unused variables
On Thu, Jan 30, 2014 at 02:44:13PM +0100, Pino Toscano wrote: > Leftovers of the list_entries_short+list_entries_long split done in > 91aae893c70b3877b31803800ba77836fd7a45e8. I think you have to write the word "commit " before the hash, so that various tools like github know it's a commit hash. (Actually, I've always assumed this, but not tested it). ACK. Rich. -- Rich...
2014 Jan 30
2
[PATCH] builder: output translated notes
...in + (match territory with + | "" -> () + | territory -> l := (lang ^ "_" ^ territory) :: !l); + l := lang :: !l; + ); + l := "" :: !l; + List.rev !l + let rec list_entries ~list_format ~sources index = match list_format with | `Short -> list_entries_short index @@ -45,6 +62,10 @@ and list_entries_short index = ) index and list_entries_long ~sources index = + let langs = match Setlocale.setlocale Setlocale.LC_MESSAGES None with + | None -> [""] + | Some locale -> split_locale locale in + List.iter ( fun (source, finge...
2017 Oct 27
0
[PATCH v11 3/8] builder: change arch type to (string, string option) maybe.
...und -> eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n; corrupt_file () in diff --git a/builder/list_entries.ml b/builder/list_entries.ml index af1d2419b..54983df8d 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -46,7 +46,10 @@ and list_entries_short index = fun (name, { Index.printable_name; arch; hidden }) -> if not hidden then ( printf "%-24s" name; - printf " %-10s" arch; + match arch with + | Either arch + | Or Some arch -> printf " %-10s" arch + |...
2017 Nov 21
0
[PATCH v13 1/3] builder: change arch type to distinguish guesses
...string_of_arch arch); Option.may (fp "sig=%s\n") signature_uri; (match checksums with | None -> () diff --git a/builder/list_entries.ml b/builder/list_entries.ml index af1d2419b..c64d554a2 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -46,7 +46,7 @@ and list_entries_short index = fun (name, { Index.printable_name; arch; hidden }) -> if not hidden then ( printf "%-24s" name; - printf " %-10s" arch; + printf " %-10s" (Index.string_of_arch arch); Option.may (printf " %s") printable_n...
2017 Nov 13
0
[PATCH v12 1/3] builder: change arch type to distinguish guesses
...arch=%s\n" arch; Option.may (fp "sig=%s\n") signature_uri; (match checksums with | None -> () diff --git a/builder/list_entries.ml b/builder/list_entries.ml index af1d2419b..c0b7e48dd 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -46,7 +46,9 @@ and list_entries_short index = fun (name, { Index.printable_name; arch; hidden }) -> if not hidden then ( printf "%-24s" name; - printf " %-10s" arch; + match arch with + | Index.Arch arch + | Index.GuessedArch arch -> printf " %-10s" ar...
2014 Mar 11
4
Re: [PATCH] builder: complete architecture handling
On Tuesday 11 March 2014 10:09:45 Richard W.M. Jones wrote: > On Mon, Mar 10, 2014 at 02:28:20PM +0100, Pino Toscano wrote: > > Add the possibility to choose which architecture use to build the > > wanted image (--arch). Since this implies that running commands on > > the guest is usually not possible when the architecture is > > different than the host one, another new
2015 Nov 10
7
[PATCH 0/4]: mllib: Add 'may' function, and refactoring.
The 'may' function is a higher-order function (HOF) that replaces: match x with | None -> () | Some x -> f x with: may f x The idea comes from lablgtk (OCaml Gtk bindings) where it is widely used. If this change is clearer than previous code, then this could be used in many more places. However I previously steered clear from using HOFs like this because they can be
2015 Jul 28
0
[PATCH 06/10] builder: split Index_parser.index in an own module
...t -> sigchecker:Sigchecker.t -> Sources.source -> Index.index diff --git a/builder/list_entries.ml b/builder/list_entries.ml index 45c7e8b..4bb899c 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -29,7 +29,7 @@ let rec list_entries ~list_format ~sources index = and list_entries_short index = List.iter ( - fun (name, { Index_parser.printable_name = printable_name; + fun (name, { Index.printable_name = printable_name; arch = arch; hidden = hidden }) -> if not hidden then ( @@ -60,7 +60,7 @@ and list_entries_long ~sources inde...
2017 Oct 08
0
[PATCH v2 3/4] common/mlstdutils: Introduce Option submodule.
...gt; fp "aliases=%s\n" (String.concat " " l)) aliases; if hidden then fp "hidden=true\n" diff --git a/builder/list_entries.ml b/builder/list_entries.ml index 2cd030fca..af1d2419b 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -47,7 +47,7 @@ and list_entries_short index = if not hidden then ( printf "%-24s" name; printf " %-10s" arch; - may (printf " %s") printable_name; + Option.may (printf " %s") printable_name; printf "\n" ) ) index @@ -73,19 +73,15...
2014 Mar 10
2
[PATCH] builder: complete architecture handling
...name_arch_map; (* Check for repeated fields. *) List.iter ( diff --git a/builder/list_entries.ml b/builder/list_entries.ml index 476bf14..75149e7 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -48,9 +48,11 @@ let rec list_entries ~list_format ~sources index = and list_entries_short index = List.iter ( fun (name, { Index_parser.printable_name = printable_name; + arch = arch; hidden = hidden }) -> if not hidden then ( printf "%-24s" name; + printf " %-10s" arch; (match printable_nam...
2017 Nov 13
6
[PATCH v12 0/3] virt-builder-repository tool
Hi there! Here is the latest version of the series including Richard's comments. I also reworked the repository_main.ml code to avoid setting an empty entry if not found. Cédric Bosdonnat (3): builder: change arch type to distinguish guesses builder: add a template parameter to get_index New tool: virt-builder-repository .gitignore | 4 +
2015 Jul 28
19
[PATCH 00/10] RFC: builder: first support for Simple Streams metadata
Hi, this series adds a basic support for Simple Streams v1.0 metadata files. This makes it possible to create a repository .conf files with [cirros] uri=http://download.cirros-cloud.net format=simplestreams to read the latest version of each CirrOS image. TODO items: - a bit more testing: listing and creating images works, so the current metadata is correct - handle revisions, so newer
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
...f this file to fix it and upload a fixed version.") uri in diff --git a/builder/list_entries.ml b/builder/list_entries.ml index c0aae1675..2cd030fca 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -43,9 +43,7 @@ let rec list_entries ~list_format ~sources index = and list_entries_short index = List.iter ( - fun (name, { Index.printable_name = printable_name; - arch = arch; - hidden = hidden }) -> + fun (name, { Index.printable_name; arch; hidden }) -> if not hidden then ( printf "%-24s" name; printf...
2017 Nov 21
5
[PATCH v13 0/3] virt-builder-repository
Hey there, Here is an update of the series. The changes: * Incorporate Richard's comments. Left out the with_openfile one since that leads to a double close. * Change the ask option return type to string (removing the option) since if the use doesn't input anything we're using the default, and the default is now a mandatory parameter. * Make sure there are items in the