Pino Toscano
2014-May-14 16:00 UTC
[Libguestfs] [PATCH 1/2] builder: save the proxy for each entry
Copy the information about the proxy of a source in all the entries of that source; this way it is possible to use it later when accessing to the actual image of an entry. --- builder/index_parser.ml | 2 ++ builder/index_parser.mli | 1 + 2 files changed, 3 insertions(+) diff --git a/builder/index_parser.ml b/builder/index_parser.ml index 2040656..40b2116 100644 --- a/builder/index_parser.ml +++ b/builder/index_parser.ml @@ -40,6 +40,7 @@ and entry = { hidden : bool; sigchecker : Sigchecker.t; + proxy : Downloader.proxy_mode; } let print_entry chan (name, { printable_name = printable_name; @@ -259,6 +260,7 @@ let get_index ~prog ~debug ~downloader ~sigchecker ~proxy source lvexpand = lvexpand; notes = notes; hidden = hidden; + proxy = proxy; sigchecker = sigchecker } in n, entry ) sections in diff --git a/builder/index_parser.mli b/builder/index_parser.mli index c2c5d11..a714d05 100644 --- a/builder/index_parser.mli +++ b/builder/index_parser.mli @@ -34,6 +34,7 @@ and entry = { hidden : bool; sigchecker : Sigchecker.t; + proxy : Downloader.proxy_mode; } val get_index : prog:string -> debug:bool -> downloader:Downloader.t -> sigchecker:Sigchecker.t -> proxy:Downloader.proxy_mode -> string -> index -- 1.9.0
Pino Toscano
2014-May-14 16:00 UTC
[Libguestfs] [PATCH 2/2] builder: respect the proxy also when downloading images (RHBZ#1096465).
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
Richard W.M. Jones
2014-May-14 22:16 UTC
Re: [Libguestfs] [PATCH 2/2] builder: respect the proxy also when downloading images (RHBZ#1096465).
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 inACK 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
Apparently Analagous Threads
- [PATCH] builder: support aliases for images (RHBZ#1098718).
- [PATCH 3/3] builder: Use the new Curl module for passing parameters to curl.
- [PATCH 00/10] RFC: builder: first support for Simple Streams metadata
- [PATCH 06/10] builder: split Index_parser.index in an own module
- [PATCH 0/3] Move Curl wrapper to mllib and use it for virt-builder.