Re: bsdtar doesn't detect end of tape

From: Arne Schwabe <arne_at_rfc2549.org>
Date: Thu, 23 Sep 2004 18:07:36 +0200
Oliver Lehmann <lehmann_at_ans-netz.de> writes:

> Tim Kientzle wrote:
>
>> Try the attached patch to src/lib/libarchive,
>> rebuild libarchive and bsdtar and let me
>> know if it fixes it for you.
>
> It looks like the patch is against the wrong file. IT actually will turn
> current to stable... But i think wee need the other direction ;) Can you
> please "turn it around" and resend it?

Look at patch -R :)

    -R, --reverse
            tells patch that this patch was created with the old and new files
            swapped.  (Yes, I'm afraid that does  happen  occasionally,  human
            nature  being  what  it is.)  Patch will attempt to swap each hunk
            around before applying it.  Rejects will come out in  the  swapped
            format.   The -R option will not work with ed diff scripts because
            there is too little information to reconstruct the reverse  opera-
            tion.

            If the first hunk of a patch fails, patch will reverse the hunk to
            see if it can be applied that way.  If it can, you will  be  asked
            if  you  want  to  have the -R option set.  If it can't, the patch
            will continue to be applied normally.  (Note: this  method  cannot
            detect  a  reversed  patch if it is a normal diff and if the first
            command is an append (i.e. it should have  been  a  delete)  since
            appends  always  succeed, due to the fact that a null context will
            match anywhere.  Luckily, most patches add or change lines  rather
            than  delete them, so most reversed normal diffs will begin with a
            delete, which will fail, triggering the heuristic.)




-- 
compiling millions of tiny c-programs...done
checking for a working configure script... not found
Received on Thu Sep 23 2004 - 14:07:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:13 UTC