[Libguestfs] [PATCH] v2v: fix provides list whitespace trim
Richard W.M. Jones
rjones at redhat.com
Sun Sep 13 10:49:15 UTC 2015
On Sat, Sep 12, 2015 at 05:52:55PM +0300, Shahar Lev wrote:
> Tabs should not be doubly-escaped in regexp.
>
> Signed-off-by: Shahar Lev <shahar at stratoscale.com>
> ---
> v2v/convert_linux.ml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml
> index adbcaa2..1e9e689 100644
> --- a/v2v/convert_linux.ml
> +++ b/v2v/convert_linux.ml
> @@ -581,7 +581,7 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source =
> List.filter (fun s -> string_find s library = -1) provides in
>
> (* Trim whitespace. *)
> - let rex = Str.regexp "^[ \\t]*\\([^ \\t]+\\)[ \\t]*$" in
> + let rex = Str.regexp "^[ \t]*\\([^ \t]+\\)[ \t]*$" in
> let provides = List.map (Str.replace_first rex "\\1") provides in
>
> (* Install the dependencies with yum. Use yum explicitly
Yes, nasty mistake. In the crappy Str library that we have to
use, \t means a literal 't' character :-(
ACKed and pushed, thanks!
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
More information about the Libguestfs
mailing list