Trying to find the missing .la file didn't help as it was a .la file that was removed. I've also read that Gentoo wants to get rid of the .la files in total. Anyhow, Gentoo has a tool called "lafilefixer", this tries, as the name implies, to fix .la file linkage. Unfortunately this didn't help. There is also a tool called "revdep-rebuild", this tries to fix missing dependencies or better said, broken linkage to dependencies. Paludis has a similar tool called "cave fix-linkage".
Unfortunately fixing the linkage to dependencies didn't work either. So I've searched on the Internet for alternative solutions and I recently found one: removing the .la files that don't belong to any package installed and then fixing broken linkage to dependencies.
This is the script I used to remove the .la files:
#!/bin/bashAfter this I fixed the breakage by running "cave fix-linkage -x" and all was solved.
for f in `find -O3 / -type f -name "*.la" -print0 | xargs -0`
do
if [ -z `cave print-owners $f` ]
then
echo file is orphaned $f
rm $f
fi
done
To prevent this from happening again I placed a hook in the paludis hooks directory to 'fix' linkage before merging to /.
I installed the hook in /etc/paludis/hooks/auto/
#!/usr/bin/env bash
hook_auto_names()
{
echo "merger_install_pre"
}
hook_run_merger_install_pre()
{
source ${PALUDIS_EBUILD_DIR}/echo_functions.bash
einfo_unhooked "Running lafilefixer"
lafilefixer ${IMAGE}
}
Geen opmerkingen:
Een reactie posten