bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in patch 2.5.4 or its documentation


From: Paul Eggert
Subject: Re: Bug in patch 2.5.4 or its documentation
Date: Thu, 30 May 2002 22:07:50 -0700 (PDT)

> From: "Derek R. Price" <derek.price@openavenue.com>
> Date: Thu, 08 Feb 2001 14:07:03 -0500
> 
> As near as I can read the man page, files should be created by patch
> if the original is listed as /dev/null or is empty and has a
> creation time of the Epoch (1970-01-01 00:00:00 UTC),

Yes, that's correct.

> regardless of
> whether --posix has been specified (it claims --posix will cause
> patch to conform to the POSIX.2 specification).

This part is not correct, as of POSIX 1003.1-2001.  The new POSIX spec
requires that the file must exist for it to be patched.  This is not
very reasonable, but it's what the spec says.

>      [dprice@empress temp]$ echo a line >tmp
>      [dprice@empress temp]$ diff -cN /dev/null tmp >tmp.diff
>      [dprice@empress temp]$ cd test
>      [dprice@empress test]$ patch --posix -p0 <../tmp.diff
>      can't find file to patch at input line 3

This is the correct behavior.  If you remove the "--posix" though,
it should work as you expected.  That was a bug in "patch" that is
(finally!) fixed in the latest test version, which you can get from:

ftp://alpha.gnu.org/gnu/patch/patch-2.5.6.tar.gz

Thanks for your bug report.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]