Issue 83548 - linkoo broken
Summary: linkoo broken
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: 680m234
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
: 86387 (view as issue list)
Depends on:
Reported: 2007-11-12 09:10 UTC by Stephan Bergmann
Modified: 2013-08-07 15:34 UTC (History)
7 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---

This seems to fix that. (1.93 KB, patch)
2007-11-27 21:41 UTC, kendy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Stephan Bergmann 2007-11-12 09:10:54 UTC
<> describes
that solenv/bin/linkoo:1.16 is broken and cannot work reliably in general.  To
avoid confusion, I would suggest removing it completely, including any
references to it from any documentation.
Comment 1 mmeeks 2007-11-12 11:23:42 UTC
Stefan - what are you smoking ? ;-)
linkoo is a critical developer tool of incredible usefulness - and it has been
working well for the last several years: and yes, it black-listed the 3-4
libraries it did not work for in the past & all was well.
I (for one) will not let it die, until something better replaces it (which
AFAICS it certainly has not).
Kendy - any chance you can unwind this breakage ? :-)
Comment 2 kendy 2007-11-12 13:57:58 UTC
Sure - I'll try, I cannot live without it either.
Comment 3 kendy 2007-11-27 21:41:08 UTC
Created attachment 49948 [details]
This seems to fix that.
Comment 4 kendy 2007-11-27 22:02:37 UTC
The thing is that osl_getAbsoluteFileURL_impl_() is not the most cunning 
function under the sun - it seems to call realpath() on each and every piece 
of the path - apparently to be able to work even when the path does not exist.  
(I mean, to resolve /ugh/blah/haha.txt, it calls realpath() first on /ugh, 
then /ugh/blah, etc.)  A side effect of realpath() is that it resolves 
symlinks, which I'm not sure is wanted in each and every case.  So - from my 
point of view, I see several possible improvements here:

- osl_getAbsoluteFileURL_impl_() could first try to call realpath(), and if, 
and only if, the file/directory does not exist, do the manual removal of '.' 
and '..'.  It could even iterate from back to front so that the first 
non-failing realpath() would give us the path we want & the reason to end the 

- osl_getAbsoluteFileURL_impl_() would not expand 'basename' symlink, just the 
symlinks that are in the 'dirname' part - that's in fact what my patch does 
when OOO_ALLOW_LINKOO_SYMLINKS is exported.  I see no bad behavior with that 
so far - what risks are here, please?

Of course - if the above is not viable, let's please at least apply the patch 
with the OOO_ALLOW_LINKOO_SYMLINKS distinction.  Not being able to use linkoo 
is really painful.
Comment 5 Stephan Bergmann 2007-11-29 05:53:24 UTC
@kendy:  I do not think it is a good idea to change the general
osl_getAbsoluteFileURL to work differently in different contexts---might open a
nice box of heisenbugs.  IMO better would be to get consensus to change
osl_getAbsoluteFileURL so that it *always* does not follow symlinks in the final
path segment (I put hro on cc).  What also has to be taken care of is how to
handle paths whose last segment is "." or "..".  (Apart from all that, if we
indeed need an environment variable, please start its name with "SAL_" instead
of "OOO_", following prior art.)
Comment 6 kendy 2007-11-29 11:24:52 UTC
sb: OK, changed the name in ooo-build svn (will not attach the changed patch 
here). did not 
give me impression that there's a rule, so thought that OOO_ is a good 
prefix - sorry :-(

hro: Please what do you think of the proposed changed not to follow symlinks 
in the final path segment?
Comment 7 kendy 2008-01-24 11:51:43 UTC
Apparently I forgot to play the re-assign ping-pong ;-)

hro: Please, what do you think of the proposal not to follow symlinks in the 
final path segment?
Comment 8 hennes.rohling 2008-01-25 11:40:30 UTC
Along with the SAL_... environment variable it's O.K. for me.
Comment 9 pavel 2008-01-30 11:31:49 UTC
linkoo is not release relevant, change target to DevTools.

Comment 10 kendy 2008-01-30 13:16:49 UTC
Changing the target to 3.0 because the change that is necessary touches OOo 

sb: Seems that hro is OK with the environment variable...  As this variable 
will be set only for the developers using linkoo [and they should know what 
they are doing ;-)] - OK for you to proceed, please?  Or anything I can do to 
help to get this in?
Comment 11 Stephan Bergmann 2008-01-30 14:15:04 UTC
@kendy:  I still consider my concerns from #desc6 valid.  But if anybody else
disagrees, so be it.
Comment 12 kendy 2008-01-30 15:07:24 UTC
sb: Yes, I'd rather go without the variable as well, and change the behavior 
as proposed (*always* does not follow symlinks in the final path segment), but 
comment 9 did not help here.  From what I see, hro is OK with the variable, 
but says nothing about the proposal, so I'd go with the variable for now, and 
let the rest rot as a follow-up bug (something like 'SAL_ALLOW_LINKOO_SYMLINKS 
should go away') in IssueZilla.  That's the best I can do from my side, sorry.
Comment 13 kendy 2008-03-06 13:33:38 UTC
*** Issue 86387 has been marked as a duplicate of this issue. ***
Comment 14 Martin Hollmichel 2008-08-01 10:47:19 UTC
ping ! is target 3.0 still valid ?
Comment 15 kendy 2008-08-01 10:52:14 UTC
Probably not.
Comment 16 Martin Hollmichel 2009-04-21 07:58:25 UTC
seems not langer valid, closing
Comment 17 Martin Hollmichel 2010-03-15 15:47:17 UTC
close issue.
Comment 18 thb 2010-03-15 16:16:26 UTC
I beg to differ.

@sb: any other avenue to make an installed office use solver/output tree libs
direcrly? if not, I'd definitely want this feature back.
Comment 19 Stephan Bergmann 2010-03-15 17:26:35 UTC
@thb:  I thought kendy had made it work again as discussed in previous comments?
Comment 20 kendy 2010-03-15 17:45:43 UTC
sb: So, the proposal to change the behavior of the 
osl_getAbsoluteFileURL_impl_() generally caused huge problems IIRC, namely on 
MacOSX, so the only thing was really to use the variable.

I am afraid I forgot to create a CWS for all this, let me fix that.  Sorry :-(
Comment 21 Stephan Bergmann 2010-03-15 18:00:03 UTC
@kendy: ...not that I am personally keen to see any of those changes ;)
Comment 22 Rob Weir 2013-03-11 15:03:33 UTC
I'm adding this comment to all open issues with Issue Type == PATCH.  We have 220 such issues, many of them quite old.  I apologize for that.  

We need your help in prioritizing which patches should be integrated into our next release, Apache OpenOffice 4.0.

If you have submitted a patch and think it is applicable for AOO 4.0, please respond with a comment to let us know.

On the other hand, if the patch is no longer relevant, please let us know that as well.

If you have any general questions or want to discuss this further, please send a note to our dev mailing list: