Moshe Kaminsky wrote:

> Hi,
>
> I've noticed that after merging every package, portage runs ldconfig
> (the 'Regenerating /etc/ld.so.cache...' message). This takes a long
> time, and as far as I understand, for most packages is unnecessary. I
> looked in portage.py, and it appears that portage indeed checks whether
> the relevant directories where modified during the merge. However, this
> check is ignored if ldconfig should create links (ie, run without the -X
> flag). Can someone explain it? as far as I understand, links are only
> created to files in the same directories that are checked, so if they
> were not modified, no links should be created, right?


Well, regarding when ldconfig should be run, the answer is after
anything that installs libraries or updates /etc/ld.so.conf. 

As to when portage runs ldconfig, well, it seems it will run it in the
following circumstances:

1. If an ebuild specifically calls out env-update.

2. After each ebuild, unless the package has been downgraded, in which
case makelinks is set to 'False'.  I'm not sure I understand this logic...

3. After packages are unmerged

4. In a very specific case after all packages are emerged...the logic is
a bit too much for me to decipher without stepping through with a
debugger, or adding a bunch of print statements.


So, I have a question for you...what exactly do you mean by "takes a
long time"?  On my system, ldconfig completes in under 10 seconds after
a fresh boot, and almost instantaneously after that.

-Richard

-- 
[email protected] mailing list

Reply via email to