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

Attachment: pgpwaQvAWJGZm.pgp
Description: PGP signature

  • ftar bug ? C. V.
    • Re: ftar bug ? Michael Tautschnig

Antwort per Email an