Mailinglist Archive: zypp-devel (102 mails)
| < Previous | Next > |
Re: [zypp-devel] Augeas for libzypp and zypper?
- From: Jan Kupec <jkupec@xxxxxxx>
- Date: Tue, 10 Mar 2009 15:17:37 +0100
- Message-id: <49B67681.9000004@xxxxxxx>
Michael Schroeder wrote:
Parsing can be done without augeas, of course. But we can add editing
capability to anything that libzypp writes with augeas: zypp.conf, .repo
files, locks, credentials, etc. Currently we just rewrite the files from
in-memory data, if we need to write them. Plus you can take advantage of
augeas & the file's structure to pick up some special things, like i
described in the original mail.
With augeas, we can add setter methods to ZConfig, for example, pretty
easily. Also for other files we use.
And yes, you can use just your lenses (to avoid parsing all .aug files)
and in the next release it will also be possible to parse only the
config file you need (instead of parsing all files that augeas finds via
its autoload feature).
--
cheers,
jano
Ján Kupec
YaST team
---------------------------------------------------------(PGP)---
Key ID: 637EE901
Fingerprint: 93B9 C79B 2D20 51C3 800B E09B 8048 46A6 637E E901
---------------------------------------------------------(IRC)---
Server: irc.freenode.net
Nick: jniq
Channels: #zypp #yast #suse #susecz
---------------------------------------------------------(EOF)---
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
On Tue, Mar 10, 2009 at 02:37:41PM +0100, Duncan Mac-Vicar P. wrote:
I think we should link libzypp with augeas for various reasons.
My understanding is that libaugeas was written to read/modify/write
a plethora of file formats, isn't it a little overkill to use it
just to parse an ini file? Preserving comments can't be the only
reason to use augeas.
Parsing can be done without augeas, of course. But we can add editing
capability to anything that libzypp writes with augeas: zypp.conf, .repo
files, locks, credentials, etc. Currently we just rewrite the files from
in-memory data, if we need to write them. Plus you can take advantage of
augeas & the file's structure to pick up some special things, like i
described in the original mail.
With augeas, we can add setter methods to ZConfig, for example, pretty
easily. Also for other files we use.
And yes, you can use just your lenses (to avoid parsing all .aug files)
and in the next release it will also be possible to parse only the
config file you need (instead of parsing all files that augeas finds via
its autoload feature).
--
cheers,
jano
Ján Kupec
YaST team
---------------------------------------------------------(PGP)---
Key ID: 637EE901
Fingerprint: 93B9 C79B 2D20 51C3 800B E09B 8048 46A6 637E E901
---------------------------------------------------------(IRC)---
Server: irc.freenode.net
Nick: jniq
Channels: #zypp #yast #suse #susecz
---------------------------------------------------------(EOF)---
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
| < Previous | Next > |