Dne 25.4.2013 16:53, Jiri Srain napsal(a):
[...]
> The more difficult part will be migration of data created on run-time...

Yesterday I checked how YCP data files are used in Yast.

There are basically these groups:

- Static data - like NTP servers, sound card drivers, mouse types, phone 
codes...

  No migration needed, the new package will also contain new database which
  will be used instead of the old one.

- Dynamically created data (by helper scrips) - some modules contain helper
  scripts (usually in perl or bash) which generate YCP output to stdout or file
  which is then read by Yast.

  No migration is needed if we also adapt the scripts. Either the data format 
can
  be changed to something else (YAML, plain text...) or the perl scripts could
  be modified to perl modules and be used directly via perl-bindings.

  (This would be also faster as no external process would be needed and the data
  would be directly converted to Yast types without the extra text 
representation
  in the middle.)

- In most cases the data is saved to survive reboot/YaST restart
  (that's the case for installation, wagon, packager ...)

  Usually no migration is needed as these are just temporary internal data
  used only for one specific run and the data is not needed after package 
upgrade.

- User preferences - like "don't show again" store, usually just simple values
  (like boolean or string) which could be even manually read/parsed from YCP 
file.

  And it should be also possible to not migrate the data at all, the user would 
be
  just asked once again, which IMHO is acceptable in some cases.

- Complete configurations - like backup or add-on creator contain whole
  application configuration in YCP format. Also bootloader saves some part of 
the
  configuration to an YCP file.

  This is the most problematic part as there are important data which cannot be 
lost.
  Here we have to provide a conversion tool or somehow support reading the old
  format.

  Or we could release a maintenance update for the affected packages and it 
would
  write the config in the future format and the conversion would be also
  called in %post to ensure that the future version (without YCP support) will 
find
  the data already in the new format.


What do you think about it?

--

Ladislav Slezák
Appliance department / YaST Developer
Lihovarská 1060/12
190 00 Prague 9 / Czech Republic
tel: +420 284 028 960
[email protected]
SUSE
-- 
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to