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

Pino Toscano ptoscano at redhat.com
Wed May 14 16:00:56 UTC 2014


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
 
-- 
1.9.0




More information about the Libguestfs mailing list