[augeas-devel] Latest yum.aug make check fail
David Lutterkort
lutter at redhat.com
Fri Aug 27 22:28:49 UTC 2010
On Sat, 2010-08-21 at 18:33 -0400, Francis Giraldeau wrote:
> It seems that the commit 620ee4 is causing failure of unit tests.
Indeed, it does.
> A new list keyword has been added to handle the case where gnupg key is
> a list. The first error I found is the list_sep that doesn't accept
> simple space between values:
>
> - let list_sep = del /[ \t]*(,[ \t]*|\n[ \t]+)/ "\n\t"
> + let list_sep = del /([ \t]*(,[ \t]*|\n[ \t]+))|[ \t]+/ "\n\t"
ACK
> The lens accept sections with one of either "baseurl" or "gpgkey", and
> an error occur when they are both present, as in
> tests/etc/yum.repos.d/remi.repo. The "lists" lens can't be iterated,
> because a iteration in put direction occur. So, I added every possible
> combinations of entries and lists:
>
> let section =
> let list_baseurl = kv_list "baseurl" in
> let list_gpgkey = kv_list "gpgkey" in
> [ sechead . ( entry*
> | entry* . list_baseurl . entry*
> | entry* . list_gpgkey . entry*
> | entry* . list_baseurl . entry* . list_gpgkey . entry*
> | entry* . list_gpgkey . entry* . list_baseurl .
> entry*)]
>
> It's ugly, but it prevent to change the tree structure, and preserve the
> behavior that reject the config if more than one baseurl option is
> present.
What happens if you have
gpgkey=key1
baseurl=url1
gpgkey=key2
Doesn't that still lead to failure ?
The problem is that the input
gpgkey=key1 key2
and
gpgkey=key1
gpgkey=key2
lead to the exact same trees. It would be nice if lenses were a little
less strict here, and we could express that we want one or the other
form as the default on create.
Canonizers go that route, but IIRC, they will _always_ pick one or the
other format (whatever you say is canonical) on put, not just on create.
I need to think about that in a little more detail. And as you mention,
enumerating all possibilities is not really a solution, since you'll die
from combinatorial explosion.
David
More information about the augeas-devel
mailing list