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

Re: Proposal to improve package configuration upgrades



Jonas Smedegaard <dr@jones.dk> writes:

> Do Config::Model support migration from one model to another?

Yes. In fact model version n can include specific attribute to deal
with migration from n-1 to n.

> Example: CUPS 2.x has boolean option foo, which is changed in CUPS 3.x 
> to numeric option foobar.

In such a case, CUPS3.x model would need to speficy that:
- boolean option foo is status deprecated (which means the value can
  be managed, but the option foo is hidden from the user in the
  interfaces)
- the default value of foobar can be computed from foo value (using
  compute attribute of Value object. See [1] for gory details)

More complex value migration scenarios are possible.

All the best

[1] http://search.cpan.org/dist/Config-Model/lib/Config/Model/ValueComputer.pm

-- 
Dominique Dumont 
"Delivering successful solutions requires giving people what they
need, not what they want." Kurt Bittner

irc:
  domidumont at irc.freenode.net
  ddumont at irc.debian.org


Reply to: