[Libguestfs] [PATCH 2/2] builder: respect the proxy also when downloading images (RHBZ#1096465).

Richard W.M. Jones rjones at redhat.com
Wed May 14 22:16:36 UTC 2014


On Wed, May 14, 2014 at 06:00:56PM +0200, Pino Toscano wrote:
> Missing from commit 87d79c2ee259ce51595ad3a924fd216f882dc477.
> ---
>  builder/builder.ml | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/builder/builder.ml b/builder/builder.ml
> index acb6129..95f90b7 100644
> --- a/builder/builder.ml
> +++ b/builder/builder.ml
> @@ -178,12 +178,13 @@ let main () =
>        | Some _ ->
>          List.iter (
>            fun (name,
> -               { Index_parser.revision = revision; file_uri = file_uri }) ->
> +               { Index_parser.revision = revision; file_uri = file_uri;
> +                 proxy = proxy }) ->
>              let template = name, arch, revision in
>              msg (f_"Downloading: %s") file_uri;
>              let progress_bar = not quiet in
>              ignore (Downloader.download ~prog downloader ~template ~progress_bar
> -                      file_uri)
> +                      ~proxy file_uri)
>          ) index;
>          exit 0
>        );
> @@ -224,11 +225,13 @@ let main () =
>    (* Download the template, or it may be in the cache. *)
>    let template =
>      let template, delete_on_exit =
> -      let { Index_parser.revision = revision; file_uri = file_uri } = entry in
> +      let { Index_parser.revision = revision; file_uri = file_uri;
> +            proxy = proxy } = entry in
>        let template = arg, arch, revision in
>        msg (f_"Downloading: %s") file_uri;
>        let progress_bar = not quiet in
> -      Downloader.download ~prog downloader ~template ~progress_bar file_uri in
> +      Downloader.download ~prog downloader ~template ~progress_bar ~proxy
> +        file_uri in
>      if delete_on_exit then unlink_on_exit template;
>      template in

ACK series.  Thanks!

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list