[gobolinux-users] Solution for situation when more programs provide same file

Jan Molič mig at 1984.cz
Thu Jun 28 11:33:15 UTC 2007


Hello,

I've found problems when more programs provide same file and you remove one of 
them. I don't think there is a way how to easily find which program you 
should re-link. 

Solution would be to create alternative symlinks instead of overwriting them 
when do SymlinkProgram. Example:

If programA, programB and programC provide Libraries/libfoo.so, these files 
would be created:

Libraries/libfoo.so -> programA/lib/libfoo.so
Libraries/.Alternative0--libfoo.so -> programB/lib/libfoo.so
Libraries/.Alternative1--libfoo.so -> programC/lib/libfoo.so

Then you remove programA. Instead of RemoveBroken there would be something 
like RepairAndRemoveBroken, which firstly find broken symlinks, then try to 
rename a non-broken alternative to name of the broken symlink and only if no 
alternative exist, remove the broken symlink.

(of course not only libraries, but any collision may be done this way)

Jan


More information about the gobolinux-users mailing list