[Elisa-commits] [MERGE] added an upgrade path for 0.3.6 version
Olivier Tilloy
olivier at fluendo.com
Thu Apr 24 11:22:42 CEST 2008
Philippe Normand wrote:
> Le jeudi 24 avril 2008 à 11:04 +0200, Olivier Tilloy a écrit :
>> bb:comment
>>
>> See my niggling comments below.
>>
>> Olivier
>>
>> Philippe Normand wrote:
>>> This little patch contains an upgrade path for the 0.3.6 version,
>>> although it's currently empty.
>>>
>>> I also fixed the media_scanner wrt the media_locations to ignore during
>>> the scan.
>>>
>>> Philippe
>>>
>>> === modified file 'elisa-core/elisa/core/config_upgrader.py'
>>> --- elisa-core/elisa/core/config_upgrader.py 2008-04-01 10:21:27 +0000
>>> +++ elisa-core/elisa/core/config_upgrader.py 2008-04-24 08:31:05 +0000
>>> @@ -133,8 +133,15 @@
>>> cfg.write(full_path)
>>>
>>> def _update_0_3_5_to_0_3_6(self, cfg=None):
>>> + self.info('Upgrading from 0.3.5 to 0.3.6')
>>> + self._backup((0, 3, 5), cfg)
>>> + if not cfg:
>>> + cfg = self._current_config
>>> +
>>> # TODO: implement me
>>> - pass
>>> +
>>> + self._current_version = '0.3.5.1'
>>> + return cfg
>>>
>>> def _update_0_3_4_to_0_3_5(self, cfg=None):
>>> self.info('Upgrading from 0.3.4 to 0.3.5')
>> I dunno anything about the upgrade logic but it seems really ugly to
>> have to define specific upgrade path functions for each new version.
>> Isn't there a better way?
>>
>
> What do you propose? Problem is that some sections are to be renamed,
> some options disappear or are replaced, some new values need to be added
> in some options and some values removed...
As I said, <quote>I dunno anything about the upgrade logic</quote>, so I
don't have any better solution to propose at the moment, just pointing
out that it looks ugly.
> [...]
More information about the Elisa-commits
mailing list