[Kimchi-devel] [PATCH 3/3] issue #461: Add 'metalink' support for YUM repositories
Aline Manera
alinefm at linux.vnet.ibm.com
Thu Mar 26 20:24:01 UTC 2015
On 26/03/2015 17:21, Crístian Viana wrote:
> On 26-03-2015 16:55, Aline Manera wrote:
>> We can use '' (empty string) as the default value while getting the
>> information from the data sent and simplify that code in a similar
>> way we did on addRepo()
>
> When adding a new repository, it doesn't matter if the user didn't
> specify one of those fields or if they specified an empty string; it's
> all "empty", and we always convert the empty value to an empty string
> when adding a new repo.
>
> However, when editing an existing repository, which is the case you
> mentioned here, there _is_ a difference between not specifying a value
> (i.e. the user doesn't want to change it) and specifying an empty
> string (i.e. the user wants to clear that field). That's why we need
> to handle a value which wasn't specified as None, and not as an empty
> string.
>
> Actually, I just followed along the existing code regarding base URL
> and mirror list, which uses None as the default (i.e. non-incoming)
> value, but I guess that is the real reason it was implemented like that.
Agree. I haven't thought about that case.
Keep doing it as it is now. But remember we can not have mirrorlist
*and* metalink - it is one or other.
More information about the Kimchi-devel
mailing list