ftar bug ?

Michael Tautschnig mt at debian.org
Sat Sep 18 09:16:50 CEST 2010


Hi,

> Hi,
> 
> while extensively testing and configuring a FAI System, I encountered a possible bug.
> 
> Using the program 'ftar' with the option '-d' did more than I expected. It deleted the content of the corresponding directory even though the tar.gz was not extracted because it did not belong to one of the classes.
> 

This behaviour also holds true for -r (recursive removal).

> Example (do not forget the implicit classes for understanding the problem):
> 
> systemA with class "A B"
> systemB with class "A C"
> 
> script/A/do:
> ftar -d /root/extractpath
> 
> corresponding file:
> files/root/extractpath/systemB.tar.gz
> 
> What now happens is that the ftar script deletes all files in '/root/extractpath' even though the tar-file is not assigned for extraction in systemA.
> So I guess that the delete operation is at the wrong point in the ftar program, since I expect the deletion only if the tar-file will be extracted, which it does not in my example.
> 

I agree that this is a bug, although the man page is IMHO not completly clear
about this; anyway, I've added a fix to the experimental branch, it's included
in 4.0~beta2+experimental9. Indeed I moved the removal code to where extraction
happens, but added statements to ensure removal only happens once.

Best,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20100918/40cd0ba1/attachment.bin 


More information about the linux-fai mailing list