Bug 83561

Summary: Symlinks creted by add existing files are not portable
Product: [Applications] kdevelop Reporter: Andrei Anghelescu <angheles>
Component: Build tools: AutomakeAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 3.0.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Andrei Anghelescu 2004-06-17 23:23:19 UTC
Version:           3.0.3 (using KDE KDE 3.2.2)
Installed from:    SuSE RPMs
Compiler:          gcc 3.3.1 
OS:                Linux

I'm using KDevelop in my work for a somewhat complex project, which contains several namespaces, and provides a library. 

Each namespace resides in its own directory, headers and implementations alike.

To facilitate the installation, I created a directory, named .include, where I added a target of type "header in pkginclude", to install the headers. I added to this target all existing headers from the other directories, and I symlinked the files. 

A simplified view of this directory structure would be:

src
 -- .include
    - tools.h -> ../Tools/tools.h
    - stuff.h -> ../Common/tools.h
 
 -- Tools
    - tools.h
 
 -- Common
    - stuff.h

This is how it the symlinks should look like. However, when I add them using the "Add existing files" dialog, the links use the absolute paths to the files:

tools.h -> /home/myself/Projects/C++/myProj/src/Tools/tools.h

A tarball of this project, would unpack on a different machine using these absolute symlinks, and the code would not compile. 

I would suggest to change the way the symlinks are handled by making them relative to the root of the project (at least as far as links within the project are concerned). Links from outside the project is a different matter and I won't make any suggestions here. 

Also, after having looked at the code a little, it seems that this feature is implemented in 
buildtools/autotools/addexistingfilesdlg.cpp lines ~290-300
Comment 1 Andreas Pakulat 2007-11-30 19:36:42 UTC
SVN commit 743355 by apaku:

Use relative links, makes the whole thing portable across machines.
BUG:83561

 M  +3 -1      addexistingfilesdlg.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=743355