[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dh_config_model_upgrade: package upgrade with Config::Model

Le jeudi 17 décembre 2009 16:41:03, Carl Fürstenberg a écrit :
> Will there be premade modules for the usual suspects? for example
> Apache, INI, perl-hash, JSON, basic shell source, debcontrol/rfc-2822,
> xml etc...

There's already a generic parser and writer for perl-hash (more accurately 
perl data structure: nested hash and array) and INI.

YAML is underway. JSON would be fast to add.

With Augeas or libdebctrl (hi Jonathan), debcontrol would be quite easy to 

Apache config style is a tougher nut to crack as I must take care of included 

> Or is it meant that each package should reinvent the
> wheel/copy-paste?

No. Parsers and writers can be shared across several models.

> Also I think there should be a "simple mode", there the model is only
> defined for the general file format (as above), which can be activated
> with only a commandline argument to dh_config_config_model, without
> the need to write perl code/understand what a model is (not all devs
> can this kind of thingis).

This holds true for syntax. But how can a file be validated (from a semantic 
point of view) if there's no model, i.e. if there's no knowledge of what's 
supposed to be in the file ? (witjhout taking syntax into account)

In fact, Augeas is much closer to what you are thinking about. But Augeas 
cannot provide configuration upgrade because there's almost no semantic 
knowledge in Augeas.

Hope this helps

http://config-model.wiki.sourceforge.net/ -o- http://search.cpan.org/~ddumont/

Reply to: