Installing data files
Nicolas Alvarez
nicolas.alvarez at gmail.com
Sun May 30 04:18:18 CEST 2010
Alexander Neundorf wrote:
> On Thursday 27 May 2010, John Layt wrote:
>> The other problem I have is that the names of the data files may change
>> over time and releases, or may even be deleted, so just installing
>> changed
>> files may result in obsolete data files being left installed. I was
>> wondering how this is usually dealt with? Is there an uninstall
>> function?
>>
>> I was thinking I could delete the already installed files each time
>> before the new set is installed, which seems slightly dodgy to me:
>>
>> file(GLOB _oldfiles ${DATA_INSTALL_DIR}/libkholidays/plan1/holiday_*)
>> if(_oldfiles)
>> file(REMOVE ${_oldfiles})
>> endif(_oldfiles)
>
> Hmm, this looks more like a task for package management. I wouldn't do
> that.
>
>> Again, is this an acceptable thing to do, or is there a better way?
>>
>> Also, how does this affect packagers, do I need to tell them?
>
> Packagers, what do you say ?
Removing executables or libraries from a CMakeLists also makes them stay
around when you're compiling and installing by hand. I don't see anyone
complaining or working around that :)
For packagers, none of this matters. People building packages run
"make install" into an *empty* installation directory, and create a package
from it. The package installation tool (like dpkg) then takes care of
deleting files that were in a previous version and aren't in the new version
of the package. So removing "old files" won't affect them in any way.
--
Nicolas
(I read mailing lists through Gmane. Please don't Cc me on replies; it makes
me get one message on my newsreader and another on email.)
More information about the Kde-buildsystem
mailing list