On Sun, 12 Apr 2009, Renat Golubchyk wrote:

> On Sun, 12 Apr 2009 09:22:17 +0100 David Leverton
> <[email protected]> wrote:
> > On Saturday 11 April 2009 22:39:07 Renat Golubchyk wrote:
> > > Looking at the source code of reconcilio I noticed that 
> > > /usr/lib*/openoffice gets added to SEARCH_DIRS_MASK as a default 
> > > (src/clients/reconcilio/broken_linkage_finder/configuration.cc, line 
> > > 293). It's hardcoded right into the programme.
> > >
> > > Excuse me, but what's the point? I understand that openoffice is a 
> > > big package and that its recompilation would need a lot of time and 
> > > space. But why should I have to inspect openoffice binaries manually 
> > > in order to find out that it has to be recompiled? Doesn't it defeat 
> > > the purpose of having a client that is supposed to find and rebuild 
> > > packages with broken linkage?
> > 
> > That's probably there because revdep-rebuild has it, or at least had.
> 
> I found only one reference to openoffice in revdep-rebuild (I have 
> app-portage/gentoolkit-0.2.4.2-r1). In the function 
> setup_search_paths_and_masks() there is the following code snippet:
> 
>   # Add the defaults
>   if [[ -d /etc/revdep-rebuild ]]; then
>     for configfile in /etc/revdep-rebuild/*; do
>       SEARCH_DIRS+=" "$(. $configfile; echo $SEARCH_DIRS)
>       SEARCH_DIRS_MASK+=" "$(. $configfile; echo $SEARCH_DIRS_MASK)
>       LD_LIBRARY_MASK+=" "$(. $configfile; echo $LD_LIBRARY_MASK)
>     done
>   else
>     SEARCH_DIRS+=" /bin /sbin /usr/bin /usr/sbin /lib* /usr/lib*"
>     SEARCH_DIRS_MASK+=" /opt/OpenOffice /usr/lib/openoffice"
>     LD_LIBRARY_MASK+=" libodbcinst.so libodbc.so libjava.so libjvm.so"
>   fi
> 
> Thus, /usr/lib/openoffice gets added only when there is no directory 
> named /etc/revdep-rebuild, otherwise the files in that directory are 
> scanned. On the contrary, reconcilio adds those directories regardless 
> of whether there are any configuration files in /etc/revdep-rebuild. I 
> would suggest to change that accordingly.


Did you look at the files in /etc/revdep-rebuild?  Pertaining to 
OpenOffice(-bin), I have the following:

$ cat /etc/revdep-rebuild/50-openoffice-bin
SEARCH_DIRS_MASK="/usr/lib/openoffice /usr/lib32/openoffice 
/usr/lib64/openoffice"

So, revdep-rebuild isn't going to do any better.  The only reason the test 
is conditioned on the existence of /etc/revdep-rebuild/ is because before 
/etc/revdep-rebuild/ existed, there was no other way to automatically 
exclude the OpenOffice directories.  (The end result With either tool is 
that the OpenOffice directories won't be searched.)



And anyway, I don't think "avoiding a large recompilation" is what the 
_MASK is designed to do.  Isn't the problem that /etc/revdep-rebuild/ is 
trying to workaround described by:

1. Instead of doing standard shared-library linking, programs install 
their own private libraries outside the general search path.

2. Those programs have wrapper scripts that setup alternate paths (using 
LD_LIBRARY_PATH or such).

3. Something like reconcilio/revdep-rebuild can't be expected to reliably 
determine whether those binaries are 'broken'.  (Because the only way to 
know whether there are broken linkages is to actually run the wrapper 
script that tells the loader where to look for libraries.)


Or am I missing something?

(I think those're the hysterical raisins, at least.  But I might be 
missing something regarding current practice, since I see OpenOffice has a 
bizarre library setup that is probably designed to at least partially 
avoid LD_LIBRARY_PATH shit that it used to do:)

e.g:
$ ldd /usr/lib/openoffice/program/soffice.bin | grep xml2
        libxml2.so.2 => 
/usr/lib/openoffice/program/../basis-link/program/../ure-link/lib/libxml2.so.2 
(0xb5a55000)

i.e. a series of circuitous symlinks:
/usr/lib/openoffice/program/../basis-link/program/../ure-link/lib
instead of:
/usr/lib/openoffice/ure/lib
(which is what that resolves to)

Best,
Ben

_______________________________________________
paludis-user mailing list
[email protected]
http://lists.pioto.org/mailman/listinfo/paludis-user

Reply via email to