Bug 30438 - Import not working with relative paths and symlinks
Summary: Import not working with relative paths and symlinks
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.6.2
Hardware: All Linux
: P3 major (vote)
Target Milestone: 1.6.3
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-02 19:10 UTC by Dominique Devienne
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments
Build file setting up the directory to reproduce the bug (1.26 KB, text/plain)
2004-08-02 19:25 UTC, Dominique Devienne
Details
Session showing the problem. (3.99 KB, text/plain)
2004-08-02 19:26 UTC, Dominique Devienne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique Devienne 2004-08-02 19:10:51 UTC
A build file at the top level (in directory .../acme/) delegates to another 
build file in src/lib2/ (.../acme/src/lib2), but src/ is a symlink 
to ../acme_src (which thus resolves to .../acme_src using getCanonicalPath). 
The build file in src/lib2/ imports ../../config/recurse.xml 
(.../acme/config/recurse.xml), but this fails, because apparently the basedir 
of src/lib2/build.xml was assigned after a getCanonicalPath() call.

Note the symlink mimicks a ClearCase view with several vobs linked together. 
Both acme and acme_src are ClearCase vobs. On Linux, acme/src is a symlink 
to ../acme_src, but not on Windows, which is why I'd really 
like ../../config/recurse.xml to be found even when traversing symlinks.

Is this a bug we can solve? I thought after Jesse's patch that this issue was 
resolved. Thanks, --DD

PS: I'll attach a build file that sets up the environment, and a session log 
that demonstrates the step to reproduce the issue on a linux system.
Comment 1 Dominique Devienne 2004-08-02 19:25:33 UTC
Created attachment 12301 [details]
Build file setting up the directory to reproduce the bug
Comment 2 Dominique Devienne 2004-08-02 19:26:18 UTC
Created attachment 12302 [details]
Session showing the problem.
Comment 3 Peter Reilly 2004-12-01 15:06:28 UTC
The probem was in Subant.java - it used a canonical path, importtask and
projecthelper2 have moved to using absolutepath, so subant should too.
With this change, the provided test works ok.
Comment 4 Dominique Devienne 2004-12-01 16:16:58 UTC
Thanks a bunch Peter. I guess it's not flatering for me to not being able to 
find the bug since I wrote SubAnt.java :-( --DD