howto convert configfile on library update?
Hans de Goede
j.w.r.degoede at hhs.nl
Sun Oct 28 14:44:49 UTC 2007
Hi All,
As discussed previously I'm working on getting lm_sensors-3.0.0 into F-9, this
not only means updating applications because the API has changed, but also
requires updating the /etc/sensors.conf configfile. A script for converting it
is provided by upstream.
But how / when do I run this script, obviously it should get run on %post, and
only if this is an update. But when?
I can rename the configfile installed by the package from /etc/sensors.conf to
/etc/sensors3.conf (the new lib will first check for sensors3.conf and then
sensors.conf to allow parallel installation). Then if the configfile was edited
an /etc/sensors.conf.rpmsave will be made. I could then check for the existence
of this and use the convert script to convert it to the new format and install
the converted file as /etc/sensors3.conf, and last remove
/etc/sensors.conf.rpmsave to make sure this is only done once.
But what if someone has an old /etc/sensors.conf.rpmsave around and is
currently happily using a pristine version of /etc/sensors.conf? I could check
the timestamp on the /etc/sensors.conf.rpmsave, assuming it has a timestamps
dating from when rpm backed it up, does it? Still feels a bit hacky to me.
Regards,
Hans
More information about the fedora-devel-list
mailing list