[Yum-devel] [PATCH] allow users to tweak PROXYAUTH settings. BZ 769254

James Antill james at fedoraproject.org
Thu Jun 28 15:51:27 UTC 2012


On Thu, 2012-06-28 at 13:46 +0200, Zdeněk Pavlas wrote:
> Unfortunately, there's no single works-for-all option,
> so let users override it.  Default (basic) works well
> for most users, so this probably does not warrant
> a proper per-request option.

 This feels like letting the user choose between two broken options. Is
there any way we can fix it, or could we just disable ntlm until 835869
is fixed?

> basic: was the default for years and worked well.
> all: enabled ntlm but may break basic (BZ 835869).
> basic+ntlm: works around the above bug
> 
> The default is to use curl's defaults (basic atm)
> Enabling >1 schemes results in small extra overhead

 I assume small here means "not really measurable"?
 Also...

> ---
>  urlgrabber/grabber.py |   11 ++++++++++-
>  1 files changed, 10 insertions(+), 1 deletions(-)
> 
> diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
> index c46f96f..c2f7647 100644
> --- a/urlgrabber/grabber.py
> +++ b/urlgrabber/grabber.py
> @@ -587,6 +587,14 @@ _log_package_state()
>  def _(st):
>      return st
>  
> +# allow users to tweak curl's PROXYAUTH settings
> +
> +_proxy_auth = 0
> +for i in os.environ.get('proxy_auth', '').split():
> +    try: _proxy_auth |= getattr(pycurl, 'HTTPAUTH_' + i.upper())
> +    except AttributeError:
> +        if DEBUG: DEBUG.error('Invalid proxy auth: %s', i)
> +

 If we want to go the "let the user choose between broken options" using
the environment is not a good way to do the configuration. It sucks to
work out what is configured and why, is basically invisible to most
users and tends to break in weird ways (Eg. yum works, except yum-cron
doesn't ... and repoquery also doesn't work).



More information about the Yum-devel mailing list