[Rear-users] Problems with multiple libraries ...

Peter Eckhardt peter at linux-freelancer.net
Mon Apr 20 09:34:38 CEST 2009


Hello,

it took a bit to answer. Somehow holidays were more important than rear :-)

ReaR has a generic problem if a libary with the same name exists in  
two different directories. A situation which appears quite regulary if  
an admin creates compatibility links or two packages bring the same  
library but decide to have them in different directories.
If such a situation arises it makes the creation of the ReaR ISO fail  
(without error message) in the LibCopyTo function. Problem is the cp  
command which can't (and shouldn't) overwrite an existing file.
Overwriting may lead to the problem that in case two libaries with the  
same name but different version or different functionality exists only  
the last one copied will survive. In case of overwriting (i.e the cp  
command line gets fixed) the cp command will succeed, the creation of  
the ReaR iso too, but the restore form the iso may fail later due to  
missing symbols in the library. So i personally prefer an abort of the  
cp than just a silent overwrite.

Thats the reason why i added the cmp command in the proposed fix. It  
will only copy if the target does not exist or if target and source  
aren't identical (then the cp will fail).


test -r "$k" || Error .....
if ! cmp "$TARGET/${basename $k}" "$k"
then
    cp -v -a ......
else
    Error "[LibCopyTo] Library $k exists more than one. Contents  
differs. Aborted"
fi
test ! -L ......

Brgds
Peter




-- 
dadi-linux Peter Eckhardt
Gymnasiumstrasse 1
76297 Stutensee-Blankenloch

Fon: +49 7244 559007
Fax: +49 7244 559041

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.





More information about the rear-users mailing list