search for: list_entries_long

Displaying 20 results from an estimated 32 matches for "list_entries_long".

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 @@ -47,9 +47,6 @@ le...
2014 May 26
2
[PATCH] builder: support aliases for images (RHBZ#1098718).
...ode -> string -> index + +(* The separator string for elements in values of type list. *) +val list_separator : string diff --git a/builder/list_entries.ml b/builder/list_entries.ml index 505a1b9..9264cfc 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -65,6 +65,7 @@ and list_entries_long ~sources index = size = size; compressed_size = compressed_size; notes = notes; + aliases = aliases; hidden = hidden }) -> if not hidden then ( printf "%-24s %s\n" "os-version:&...
2014 Jan 22
2
[PATCH] builder: read all the available notes from the index
...ing option; - notes : string option; + notes : (string * string) list; hidden : bool; sigchecker : Sigchecker.t; diff --git a/builder/list_entries.ml b/builder/list_entries.ml index 7369e6c..742e43b 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -71,10 +71,10 @@ and list_entries_long ~sources index = printf "%-24s %s\n" (s_"Download size:") (human_size size); ); (match notes with - | None -> () - | Some notes -> + | ("", notes) :: _ -> printf "\n"; printf (f_...
2016 Jul 18
0
[PATCH 3/3] builder: improve the handling of list formats
...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 --git a/builder/list_entries.mli b/build...
2014 Feb 24
2
[PATCH] builder: add a mandatory 'arch' key in index files
...uri : string option; (* deprecated, will be removed in 1.26 *) checksum_sha512 : string option; revision : int; diff --git a/builder/list_entries.ml b/builder/list_entries.ml index 27ea95e..edf7dfb 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -73,6 +73,7 @@ and list_entries_long ~sources index = List.iter ( fun (name, { Index_parser.printable_name = printable_name; + arch = arch; size = size; compressed_size = compressed_size; notes = notes; @@ -83,6 +84,7 @@ and list_entries_long ~sources inde...
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 Oct 31
4
[PATCH] builder: move the gpgkey_type type from Sigchecker to Utils
..., Downloader.SystemProxy ) sources in let sources = List.append repos sources in let index : Index_parser.index = diff --git a/builder/list_entries.ml b/builder/list_entries.ml index 2727c9f..2f8107f 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -50,10 +50,10 @@ and list_entries_long ~sources index = fun (source, key, proxy) -> printf (f_"Source URI: %s\n") source; (match key with - | Sigchecker.No_Key -> () - | Sigchecker.Fingerprint fp -> + | Utils.No_Key -> () + | Utils.Fingerprint fp -> printf (f_&quot...
2014 Oct 31
0
[PATCH] builder: pass Sources.source objects directly
...prog:string -> verbose:bool -> downloader:Downloader.t -> sigchecker:Sigchecker.t -> Sources.source -> index diff --git a/builder/list_entries.ml b/builder/list_entries.ml index 2f8107f..d78ddf8 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -47,9 +47,9 @@ and list_entries_long ~sources index = let langs = Languages.languages () in List.iter ( - fun (source, key, proxy) -> - printf (f_"Source URI: %s\n") source; - (match key with + fun { Sources.uri; gpgkey } -> + printf (f_"Source URI: %s\n") uri; + (match gpgke...
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
...it 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 index = + let trailing_comma index size =...
2014 Mar 11
3
[PATCH 1/2] builder: move some language-related code into a Languages module
...g ^ "_" ^ 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 List.iter ( fun (source, key) -> @@ -97,19 +77,7 @@ and list_entries_long ~sou...
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. -- Richard Jones, Virtual...
2014 Jan 22
0
Re: [PATCH] builder: read all the available notes from the index
..."", notes) :: _ } -> > print_endline notes; > - | { Index_parser.notes = None } -> > + | { Index_parser.notes = _ } -> If you have to match on _, especially: > --- a/builder/list_entries.ml > +++ b/builder/list_entries.ml > @@ -71,10 +71,10 @@ and list_entries_long ~sources index = > printf "%-24s %s\n" (s_"Download size:") (human_size size); > ); > (match notes with > - | None -> () > - | Some notes -> > + | ("", notes) :: _ -> > printf &q...
2014 Jan 30
2
[PATCH] builder: output translated notes
...^ "_" ^ 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, fingerprint) -> printf (f_"Source URI: %s\n") source; @@ -70,11 +91,21 @@ and...
2014 Jan 23
2
Re: [PATCH] builder: read all the available notes from the index
...print_endline notes; > > > > - | { Index_parser.notes = None } -> > > + | { Index_parser.notes = _ } -> > > If you have to match on _, especially: > > --- a/builder/list_entries.ml > > +++ b/builder/list_entries.ml > > @@ -71,10 +71,10 @@ and list_entries_long ~sources index = > > > > printf "%-24s %s\n" (s_"Download size:") (human_size > > size); > > > > ); > > (match notes with > > > > - | None -> () > > - | Som...
2014 Oct 10
0
[PATCH 3/3] builder: use the JSON module
...mllib/JSON.cmx \ $(top_builddir)/mllib/uri-c.o \ $(top_builddir)/mllib/uRI.cmx \ $(top_builddir)/mllib/mkdtemp-c.o \ diff --git a/builder/list_entries.ml b/builder/list_entries.ml index 1891679..2727c9f 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -97,92 +97,64 @@ and list_entries_long ~sources index = ) index and list_entries_json ~sources index = - let trailing_comma index size = - if index = size - 1 then "" else "," in - let json_string_of_bool b = - if b then "true" else "false" in - let json_string_escape str = - let...
2017 Oct 27
0
[PATCH v11 3/8] builder: change arch type to (string, string option) maybe.
...printf " %-10s" arch; + match arch with + | Either arch + | Or Some arch -> printf " %-10s" arch + | Or None -> (); Option.may (printf " %s") printable_name; printf "\n" ) @@ -74,7 +77,10 @@ and list_entries_long ~sources index = if not hidden then ( printf "%-24s %s\n" "os-version:" name; Option.may (printf "%-24s %s\n" (s_"Full name:")) printable_name; - printf "%-24s %s\n" (s_"Architecture:") arch; + match...
2017 Nov 21
0
[PATCH v13 1/3] builder: change arch type to distinguish guesses
...gt; if not hidden then ( printf "%-24s" name; - printf " %-10s" arch; + printf " %-10s" (Index.string_of_arch arch); Option.may (printf " %s") printable_name; printf "\n" ) @@ -74,7 +74,7 @@ and list_entries_long ~sources index = if not hidden then ( printf "%-24s %s\n" "os-version:" name; Option.may (printf "%-24s %s\n" (s_"Full name:")) printable_name; - printf "%-24s %s\n" (s_"Architecture:") arch; + printf...
2017 Nov 13
0
[PATCH v12 1/3] builder: change arch type to distinguish guesses
...quot; name; - printf " %-10s" arch; + match arch with + | Index.Arch arch + | Index.GuessedArch arch -> printf " %-10s" arch; Option.may (printf " %s") printable_name; printf "\n" ) @@ -74,7 +76,9 @@ and list_entries_long ~sources index = if not hidden then ( printf "%-24s %s\n" "os-version:" name; Option.may (printf "%-24s %s\n" (s_"Full name:")) printable_name; - printf "%-24s %s\n" (s_"Architecture:") arch; + match...
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