Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Sep 2004 18:07:36 +0200
From:      Arne Schwabe <arne@rfc2549.org>
To:        Oliver Lehmann <lehmann@ans-netz.de>
Cc:        freebsd-current@freebsd.org
Subject:   Re: bsdtar doesn't detect end of tape
Message-ID:  <86r7ot0y0n.fsf@kamino.rfc1149.org>
In-Reply-To: <20040923175411.7eeb0ee9.lehmann@ans-netz.de> (Oliver Lehmann's message of "Thu, 23 Sep 2004 17:54:11 %2B0200")
References:  <20040923062411.7b5a70d7.lehmann@ans-netz.de> <20040923175411.7eeb0ee9.lehmann@ans-netz.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Oliver Lehmann <lehmann@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86r7ot0y0n.fsf>