Hopefully this irc transcript will tell the whole story. :) TIA (01:46) @<absinthe> seemant: one thing i've noticed and i'm sure this has been commented on already, but portage runs ldconfig more than it needs to be run. (01:46) @<seemant> absinthe: make an analysis and/or patch and talk with nick about it (01:46) @<woodchip> absinthe: i dont think that's correct... i know nick worked on that quit a bit a while ago... (01:46) @<absinthe> seemant: well my general feeling is that portage shouldn't run ldconfig unless it knows it installed libs. (01:47) @<absinthe> it seems to run ldconfig for everything. (01:47) @<seemant> absinthe: that's added complexity too, though (01:47) @<absinthe> true, but saves a lot of time for packages that don't install libs. (01:47) +<Magnade> seemant: not by much if done right (01:47) @<seemant> oh? (01:48) +<Magnade> well if you were to have portage just load up the lib dirs that ldconfig scans into an array (01:48) +<Magnade> just before merging the stuff (01:48) +<Magnade> it can just check the path while its moving files (01:49) +<Magnade> then just a if libs ldconfig (01:49) @<seemant> conceivably, it could just test for presence of those directories in ${D}, then (01:49) @<seemant> instead of scanning path while merging (01:50) +<Magnade> seemant: true but if portage is making a package there isnt a need to run those checks (01:53) @<absinthe> seemant: to further my point from earlier, i just merged the latest -ck kernel, and it runs ldconfig TWICE. once after the merge, and once on autoclean... ugh. (01:53) @<absinthe> once is one time too many for merging kernel source... :) (01:54) @<seemant> absinthe: is that wrong? (01:54) @<absinthe> it's unnecessary... (01:54) @<absinthe> just adds to the amt of time needed to merge stuff that otherwise doesn't install libs. (01:54) +<Magnade> on a slower system those runs can really add up (01:54) +<Magnade> more so if its low mem :\ (01:54) @<absinthe> that's more or less my point, yes (01:55) @<seemant> absinthe: open a bug to nick
The reason it runs ldconfig so many times is mostly for safety. The problem with doing as is suggested here is that env_update would have to be informed of all information used for merging and unmerging packages. env_update is completely seperate from the merge process and updates the files used when calculating ldconfig's path info. It's a complexity and safety issue... This might get cleaned up more in the distant future, but for the time being, it won't change.