diff mbox

[2/2] s/HttpProxy/DebianMirrorProxy/

Message ID 22534.17607.320720.470301@mariner.uk.xensource.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ian Jackson Oct. 18, 2016, 3:50 p.m. UTC
Konrad Rzeszutek Wilk writes ("[PATCH 2/2] s/HttpProxy/DebianMirrorProxy/"):
> From: Konrad Rzeszutek Wilk <konrad@osstest.dumpdata.com>
...
> When constructing Debian related items we should be using the
> DebianMirrorProxy instead of all catch HttpProxy.

I don't think this is right, because apt-cachers and the like are only
required to support apt's uses, and not wgets of bits of installer.

But:

> Or alternatively support the case where are no HttProxy at all.

This is right.  So I think the patch below is better.

Ian.

From 85741f132e62e0cdaef66860d417fa80e9df7a13 Mon Sep 17 00:00:00 2001
From: Ian Jackson <ian.jackson@eu.citrix.com>
Date: Tue, 18 Oct 2016 16:46:20 +0100
Subject: [OSSTEST PATCH] mgi-common: Support empty (unset) HttpProxy properly

mg_update_proxy ends up being set to the empty string so the {...:+-x}
form is needed to expand only non-empty values to `-x'.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Marcos Matsunaga <Marcos.Matsunaga@oracle.com>
---
 mgi-common | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Konrad Rzeszutek Wilk Oct. 26, 2016, 1:56 p.m. UTC | #1
On Tue, Oct 18, 2016 at 04:50:31PM +0100, Ian Jackson wrote:
> Konrad Rzeszutek Wilk writes ("[PATCH 2/2] s/HttpProxy/DebianMirrorProxy/"):
> > From: Konrad Rzeszutek Wilk <konrad@osstest.dumpdata.com>
> ...
> > When constructing Debian related items we should be using the
> > DebianMirrorProxy instead of all catch HttpProxy.
> 
> I don't think this is right, because apt-cachers and the like are only
> required to support apt's uses, and not wgets of bits of installer.

Yup!
> 
> But:
> 
> > Or alternatively support the case where are no HttProxy at all.
> 
> This is right.  So I think the patch below is better.
> 
> Ian.
> 
> >From 85741f132e62e0cdaef66860d417fa80e9df7a13 Mon Sep 17 00:00:00 2001
> From: Ian Jackson <ian.jackson@eu.citrix.com>
> Date: Tue, 18 Oct 2016 16:46:20 +0100
> Subject: [OSSTEST PATCH] mgi-common: Support empty (unset) HttpProxy properly
> 
> mg_update_proxy ends up being set to the empty string so the {...:+-x}
> form is needed to expand only non-empty values to `-x'.
> 
> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
> Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

And Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

> CC: Marcos Matsunaga <Marcos.Matsunaga@oracle.com>
> ---
>  mgi-common | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mgi-common b/mgi-common
> index 8a2c2d9..5081521 100644
> --- a/mgi-common
> +++ b/mgi-common
> @@ -30,7 +30,7 @@ fetch () {
>  		cd $mg_update_org_pwd && getconfig HttpProxy
>  	)}
>  	curl -s -H 'Pragma: no-cache' \
> -		${mg_update_proxy+-x} ${mg_update_proxy} \
> +		${mg_update_proxy:+-x} ${mg_update_proxy} \
>  		$1
>  }
>  
> -- 
> 2.9.3
>
diff mbox

Patch

diff --git a/mgi-common b/mgi-common
index 8a2c2d9..5081521 100644
--- a/mgi-common
+++ b/mgi-common
@@ -30,7 +30,7 @@  fetch () {
 		cd $mg_update_org_pwd && getconfig HttpProxy
 	)}
 	curl -s -H 'Pragma: no-cache' \
-		${mg_update_proxy+-x} ${mg_update_proxy} \
+		${mg_update_proxy:+-x} ${mg_update_proxy} \
 		$1
 }