[augeas-devel] Language revamp
David Lutterkort
dlutter at redhat.com
Sat Mar 29 01:37:23 UTC 2008
On Tue, 2008-03-18 at 21:03 +0000, David Lutterkort wrote:
> > I really dont like the idea of the config tree being different from the
> > actual file system. I understand that it would promote portablity
> > between layouts, but if I am workning on file system editing.. I think
> > it would improve readability to see the actual hierarchy.
>
> As so many things: it depends ;) For some things, you want a very clear
> maping between files and entries in the tree. For others, you don't care
> - for example, for yum repos, I don't think anybody really cares too
> much what file the fedora repo is defined in; all you care is to turn
> gpgcheck on for that repo. Do you see that differently ?
Just to rehash this a little and solicit some feedback: I am mostly done
with the language rework (modulo testing), the one remaining issue is
the business of describing where the contents of a file appear in the
tree. Mimicking what I've done so far turns out to be much more
difficult than I initially though, mostly because the new language
requires me to be a lot more explicit about what each individual
construct means.
Initially, I thought it would be nice to have some flexibility in where
files are mapped into the tree, so that, e.g. for yum you can create a
tree that looks like /system/config/yum/SECTION where SECTION is the
name of the config section in a yum config file, regardless of whether
that comes from yum.conf or from /etc/yum.repos.d or ...
Since getting that right turns out to be pretty sticky, I am wondering
if there is much value in doing that, or if it wouldn't be enough to
structure things in a more 'raw' manner so that you'd have for yum
/files/etc/yum.conf
/files/etc/yum.repos.d/fedora.repo
/files/etc/yum.repos.d/livna.repo
...
with a structure reflecting the section/key/value inistyle structure of
yum's config files.
I would just go with the 'raw' option and wallpaper over that at some
later point with symlinks, but Augeas doesn't support links in the tree
since symlinks scare me a bit.
Does anybody have any strong preferences one way or the other ? Examples
for something that might be harder/easier with one or the other ?
David
More information about the augeas-devel
mailing list