On Thu, 2011-03-10 at 12:47 -0500, James Antill wrote:
> ---
>  yum/config.py |   20 +++++++++++++++++---
>  1 files changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/yum/config.py b/yum/config.py
> index 9c2db93..8c966f8 100644
> --- a/yum/config.py
> +++ b/yum/config.py
> @@ -1051,10 +1051,24 @@ def writeRawRepoFile(repo,only=None):
>      # Updated the ConfigParser with the changed values    
>      cfgOptions = repo.cfg.options(repo.id)
>      for name,value in repo.iteritems():
> +        if value is None: # Proxy
> +            continue
> +
> +        if only is not None and name not in only:
> +            continue
> +
>          option = repo.optionobj(name)
> -        if option.default != value or name in cfgOptions :
> -            if only == None or name in only:
> -                ini[section_id][name] = option.tostring(value)
> +        ovalue = option.tostring(value)
> +        #  If the value is the same, but just interpreted ... when we don't 
> want
> +        # to keep the interpreted values.
> +        if (name in ini[section_id] and
> +            ovalue == varReplace(ini[section_id][name], yumvar)):
> +            ovalue = ini[section_id][name]
> +
> +        if name not in cfgOptions and option.default == value:
> +            continue
> +
> +        ini[section_id][name] = ovalue
>      fp =file(repo.repofile,"w")               
>      fp.write(str(ini))
>      fp.close()


ACK
probably gonna get us into trouble but
ACK

-sv


_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to