Displaying 20 results from an estimated 37 matches for "list_format".
2016 Jul 18
0
[PATCH 3/3] builder: improve the handling of list formats
...+-
4 files changed, 43 insertions(+), 15 deletions(-)
diff --git a/builder/cmdline.ml b/builder/cmdline.ml
index 846c2e3..0667994 100644
--- a/builder/cmdline.ml
+++ b/builder/cmdline.ml
@@ -42,7 +42,7 @@ type cmdline = {
delete_on_failure : bool;
format : string option;
gpg : string;
- list_format : [`Short|`Long|`Json];
+ list_format : List_entries.format;
memsize : int option;
network : bool;
ops : Customize_cmdline.ops;
@@ -88,15 +88,13 @@ let parse_cmdline () =
let format = ref "" in
let gpg = ref "gpg" in
- let list_format = ref `Short in
- let li...
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
2015 Nov 11
0
[PATCH] builder: Make the interface between cmdline.ml and builder.ml explicit.
...* it under the terms of the GNU General Public License as published by
@@ -77,11 +77,7 @@ let remove_duplicates index =
let main () =
(* Command line argument parsing - see cmdline.ml. *)
- let mode, arg,
- arch, attach, cache, check_signature, curl,
- delete_on_failure, format, gpg, list_format, memsize,
- network, ops, output, size, smp, sources, sync =
- parse_cmdline () in
+ let cmdline = parse_cmdline () in
(* If debugging, echo the command line arguments and the sources. *)
if verbose () then (
@@ -91,29 +87,29 @@ let main () =
iteri (
fun i (source, finger...
2014 Jan 16
0
[PATCH 3/3] builder: add a JSON output for --list
...+++++++++++++++++
builder/virt-builder.pod | 12 ++++++-
5 files changed, 141 insertions(+), 3 deletions(-)
diff --git a/builder/cmdline.ml b/builder/cmdline.ml
index 6d6439f..e3b1484 100644
--- a/builder/cmdline.ml
+++ b/builder/cmdline.ml
@@ -136,6 +136,7 @@ let parse_cmdline () =
list_format := match arg with
| "short" -> `Short
| "long" -> `Long
+ | "json" -> `Json
| fmt ->
eprintf (f_"%s: invalid --list-format type '%s', see the man page.\n") prog fmt;
exit 1 in
@@ -265,7 +266,7 @@ let parse_c...
2014 Jan 16
0
[PATCH 2/3] builder: add --list-format
...++++-
builder/virt-builder.pod | 24 +++++++++++++++++++++---
2 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/builder/cmdline.ml b/builder/cmdline.ml
index f199f03..6d6439f 100644
--- a/builder/cmdline.ml
+++ b/builder/cmdline.ml
@@ -132,6 +132,13 @@ let parse_cmdline () =
let list_format = ref `Short in
let list_set_long () = list_format := `Long in
+ let list_set_format arg =
+ list_format := match arg with
+ | "short" -> `Short
+ | "long" -> `Long
+ | fmt ->
+ eprintf (f_"%s: invalid --list-format type '%s', see the m...
2014 Oct 31
4
[PATCH] builder: move the gpgkey_type type from Sigchecker to Utils
...JSON.Dict item
) sources in
diff --git a/builder/list_entries.mli b/builder/list_entries.mli
index ce012c4..520eb33 100644
--- a/builder/list_entries.mli
+++ b/builder/list_entries.mli
@@ -16,4 +16,4 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*)
-val list_entries : list_format:([ `Short | `Long | `Json ]) -> sources:(string * Sigchecker.gpgkey_type * Downloader.proxy_mode) list -> Index_parser.index -> unit
+val list_entries : list_format:([ `Short | `Long | `Json ]) -> sources:(string * Utils.gpgkey_type * Downloader.proxy_mode) list -> Index_parser.index...
2016 Jan 14
0
[PATCH 2/2] builder: allow a specific template for --list
...h cmdline.arg with
+ | "" -> sources, index (* no template -> all the available ones *)
+ | arg -> (* just the specified template *)
+ let item = selected_cli_item cmdline index in
+ [], [item] in
List_entries.list_entries ~list_format:cmdline.list_format ~sources index;
exit 0
diff --git a/builder/cmdline.ml b/builder/cmdline.ml
index a077289..f872bd4 100644
--- a/builder/cmdline.ml
+++ b/builder/cmdline.ml
@@ -239,9 +239,10 @@ read the man page virt-builder(1).
if format <> None then
error (f_&quo...
2014 Feb 21
2
[PATCH] builder: add an arch field to sources read from indexes
...ex_parser.mli | 3 ++-
4 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
index 80ccef7..d6d7570 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -42,7 +42,7 @@ let main () =
edit, firstboot, run, format, gpg, hostname, install, list_format, links,
memsize, mkdirs,
network, output, password_crypto, quiet, root_password, scrub,
- scrub_logfile, selinux_relabel, size, smp, sources, sync, timezone,
+ scrub_logfile, selinux_relabel, size, smp, sources, indexarch, sync, timezone,
update, upload, writes =
parse_cmd...
2018 Aug 22
1
Re: [PATCH 2/2] OCaml tools: add output selection for --machine-readable
...need to use ksprintf.
> (* No elements and machine-readable mode? Print some facts. *)
> if elements = [] && machine_readable () then (
> - printf "virt-dib\n";
> + machine_readable_printf "virt-dib\n";
> let formats_list = Output_format.list_formats () in
> - List.iter (printf "output:%s\n") formats_list;
> + List.iter (machine_readable_printf "output:%s\n") formats_list;
> exit 0
> );
So this caller would become:
match machine_readable (), elements = [] with
| None, _ -> ()
| Some pr,...
2017 Apr 06
1
[PATCH v2] builder: Allow GnuPG v2 or v1 to be used (RHBZ#1438939).
...let format = ref "" in
- let gpg = ref "gpg" in
+ let gpg =
+ try which "gpg2"
+ with Executable_not_found _ ->
+ try which "gpg"
+ with Executable_not_found _ ->
+ "" in
+ let gpg = ref gpg in
let list_format = ref List_entries.Short in
let list_set_long () = list_format := List_entries.Long in
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
index b48b1241b..dbbd6469e 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -314,8 +314,10 @@ F</boot> directory of...
2017 Apr 04
2
[PATCH] builder: Allow GnuPG v2 or v1 to be used (RHBZ#1438939).
...52e8f5..5424e885a 100644
--- a/builder/cmdline.ml
+++ b/builder/cmdline.ml
@@ -87,7 +87,7 @@ let parse_cmdline () =
let add_fingerprint arg = push_front arg fingerprints in
let format = ref "" in
- let gpg = ref "gpg" in
+ let gpg = ref Guestfs_config.gnupg in
let list_format = ref List_entries.Short in
let list_set_long () = list_format := List_entries.Long in
diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod
index 5e314b34d..b29fcc4ab 100644
--- a/docs/guestfs-building.pod
+++ b/docs/guestfs-building.pod
@@ -280,10 +280,25 @@ Optional. For the L&l...
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
2016 Jan 14
2
[PATCH 1/2] builder: move os-version search in own function
Simple code motion, no behaviour changes.
---
builder/builder.ml | 46 ++++++++++++++++++++++++++--------------------
1 file changed, 26 insertions(+), 20 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
index 9c26573..ec9919f 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -75,6 +75,30 @@ let remove_duplicates index =
false
) index
+(* Look for the
2014 Oct 31
0
[PATCH] builder: pass Sources.source objects directly
...nt", JSON.String fp) :: item
diff --git a/builder/list_entries.mli b/builder/list_entries.mli
index 520eb33..4765f67 100644
--- a/builder/list_entries.mli
+++ b/builder/list_entries.mli
@@ -16,4 +16,4 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*)
-val list_entries : list_format:([ `Short | `Long | `Json ]) -> sources:(string * Utils.gpgkey_type * Downloader.proxy_mode) list -> Index_parser.index -> unit
+val list_entries : list_format:([ `Short | `Long | `Json ]) -> sources:Sources.source list -> Index_parser.index -> unit
--
1.9.3
2018 Aug 20
0
[PATCH 2/2] OCaml tools: simplify machine-readable handling
...| 8 ++------
13 files changed, 26 insertions(+), 53 deletions(-)
diff --git a/builder/cmdline.ml b/builder/cmdline.ml
index fa8a83d3e..9c854ed49 100644
--- a/builder/cmdline.ml
+++ b/builder/cmdline.ml
@@ -104,8 +104,6 @@ let parse_cmdline () =
* Getopt handling of Symbol. *)
list_format := List_entries.list_format_of_string arg in
- let machine_readable = ref false in
-
let memsize = ref None in
let set_memsize arg = memsize := Some arg in
@@ -155,7 +153,6 @@ let parse_cmdline () =
[ L"long" ], Getopt.Unit list_set_long, s_"Shortcut for --list-...
2014 Mar 10
2
[PATCH] builder: complete architecture handling
...l
+++ b/builder/builder.ml
@@ -38,9 +38,9 @@ let () = Random.self_init ()
let main () =
(* Command line argument parsing - see cmdline.ml. *)
let mode, arg,
- attach, cache, check_signature, curl, debug, delete, delete_on_failure,
- edit, firstboot, run, format, gpg, hostname, install, list_format, links,
- memsize, mkdirs,
+ arch, attach, cache, check_signature, curl, debug, delete,
+ delete_on_failure, edit, firstboot, run, format, gpg, hostname, install,
+ list_format, links, memsize, mkdirs,
network, output, password_crypto, quiet, root_password, scrub,
scrub_logfil...
2014 Mar 11
3
[PATCH 1/2] builder: move some language-related code into a Languages module
...t lang = Str.matched_group 1 loc in
- let territory = match_or_empty 3 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 -> [""]
- | So...
2015 Jul 28
0
[PATCH 06/10] builder: split Index_parser.index in an own module
...l get_index : downloader:Downloader.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 +...
2018 Aug 20
2
[PATCH 1/2] mlstdutils/mltools: factorize the machine-readable option
Store the machine-readable flag globally, just like done for
verbose/debug/etc, and enhance create_standard_options to provide
--machine-readable automatically.
---
common/mlstdutils/std_utils.ml | 4 ++++
common/mlstdutils/std_utils.mli | 7 +++++--
common/mltools/tools_utils.ml | 7 ++++++-
common/mltools/tools_utils.mli | 5 ++++-
4 files changed, 19 insertions(+), 4 deletions(-)
diff