Bug 83561 - Symlinks creted by add existing files are not portable
Summary: Symlinks creted by add existing files are not portable
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: Automake (show other bugs)
Version: 3.0.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-17 23:23 UTC by Andrei Anghelescu
Modified: 2007-11-30 19:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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