On Fri, Dec 06, 2013 at 02:58:27PM +0100, Pino Toscano wrote:
On Wednesday 04 December 2013 15:34:46 Pino Toscano wrote:
> Translate also the "OS version" and "Notes" strings that appear
in the
> --long output.
> ---
> builder/list_entries.ml | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/builder/list_entries.ml b/builder/list_entries.ml
> index 8c24fe2..a1d0696 100644
> --- a/builder/list_entries.ml
> +++ b/builder/list_entries.ml
> @@ -47,7 +47,7 @@ let list_entries ?(list_long = false) ~sources index
> = printf "\n"
> )
> else ( (* Long *)
> - printf "%-24s %s\n" "os-version:" name;
> + printf "%-24s %s\n" (s_"OS version:") name;
Oops, I suck, I just realized now that this string change broke
test-virt-builder-list.sh, patch fixing it coming in a moment. Sorry for
this.
OTOH, that makes me think whether virt-builder shouldn't have some kind
of porcelain/XML/JSON/CSV/etc output for --list to ease its parsing, as
it could be translated and changed anytime (like done above).
Good idea? If so, which format?
First of all cannot change the existing format, but we can certainly
add a flag to choose an alternate format. cf. 'qemu-img info' has a
flag that lets you select between "human" and "json".
I have no strong opinions about the format to use. One which doesn't
require any external library, but since this is output rather than
input we probably don't need an external library.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v