2007/6/1, Aaron Griffin <aaronmgriffin@gmail.com>:
On 6/1/07, Dan McGee <dpmcgee@gmail.com> wrote:
Aaron and I both want to move this config file parsing to the front end; any objections to this? It will be quite a change, but we can make it much more robust while moving it. Is anyone familiar with how config file parsing is done by other programs? It seems like a very manual process currently, and a malformed config file brings pacman down. I also think we should try to continue when we encounter an unrecognized option.
What do you mean "other programs"? As in, an elegant parsing system? Or how other apps parse pacman.conf?
I'm suggesting to use 3rd party library for parsing. I see 2 choices: 1) iniparser there is nice console app that can be used by shell scripts to parse config (made by James): http://archlinux.org/~james/projects/network/iniread-0.1/ usage example: http://archlinux.org/pipermail/arch-dev-public/2007-April/000415.html 2) libconfuse this one has nice validation features -- Roman Kyrylych (Роман Кирилич)