Bug 224528

Summary: Build system does not remove all files on 'make uninstall'
Product: [Applications] kmymoney Reporter: Thomas Baumgart <tbaumgart>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED UPSTREAM    
Severity: minor    
Priority: LO    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Thomas Baumgart 2010-01-27 21:23:45 UTC
Version:            (using KDE 4.3.4)
OS:                Linux
Installed from:    openSUSE RPMs

After a 'make install' a 'make uninstall' leaves some files behind. Here's a list:

/usr/lib/libkmm_kdchart.so    /usr/lib/libkmm_mymoney.so.4
/usr/lib/libkmm_kdchart.so.4  /usr/lib/libkmm_plugin.so
/usr/lib/libkmm_mymoney.so    /usr/lib/libkmm_plugin.so.4
Comment 1 Thomas Baumgart 2010-01-27 21:30:50 UTC
These files are all symbolic links.
Comment 2 Thomas Baumgart 2010-02-06 13:15:04 UTC
Some more analysis: this seems to be a general KDE problem!

It is caused by the contents of the file KDE/kdelibs/cmake/modules/kde4_cmake_uninstall.cmake.in (http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/kde4_cmake_uninstall.cmake.in?revision=558348&view=markup) where in line #11 the option '-f' is missing. For some reason, cmake does not remove symlinks that are broken.

All those links will not be removed since the install_manifest.txt contains the real lib file first and then the links (which is OK).

Is this ( http://lists.kde.org/?l=kde-buildsystem&m=123602982417502&w=2 ) related?

I am using cmake 2.8.0
Comment 3 Thomas Baumgart 2010-07-27 12:05:09 UTC
More on this: the generated cmake_uninstall.cmake file contains the following code fragment:

  MESSAGE(STATUS "Uninstalling \"${file}\"")
  IF(EXISTS "${file}")
    EXEC_PROGRAM(
      "/usr/bin/cmake" ARGS "-E remove \"${file}\""
      OUTPUT_VARIABLE rm_out
      RETURN_VALUE rm_retval
      )

and that second line

  IF(EXISTS "${file}")

causes the trouble because the library might already be removed and then the check on the symbolic link yields that the file does not exist anymore.