Installing data files
Maciej Mrozowski
reavertm at gmail.com
Tue Jun 1 10:45:43 CEST 2010
On Sunday 30 of May 2010 04:18:18 Nicolas Alvarez wrote:
> 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 :)
It depends. If installation script mangles files from hardcoded location (for
instance /usr/share instead of CMAKE_INSTALL_PREFIX/share) it will certainly
anger some packagers and force them to work it around (not every package
managers use fakeroot, some just set install prefix to some installation
directory and report all illegal, out-of-installation-directory access via ld
preloaded hooks, like Gentoo sandbox).
So as soon as it's within CMAKE_INSTALL_PREFIX, packagers won't be angry
because it will be no-op for them, and it should still solve issues for those
compiling and installing stuff from source manually.
--
regards
MM
More information about the Kde-buildsystem
mailing list