[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU patch not completely posix compliant in --posix mode
From: |
Peter Maydell |
Subject: |
Re: GNU patch not completely posix compliant in --posix mode |
Date: |
Mon, 03 Dec 2001 15:49:45 +0000 |
Paul Eggert wrote:
>> The POSIX specs for the patch utility say:
>> (POSIX 2, page 588, section 5.22.7.2, part (1))
>> # If the patch contains the strings *** and ---, the patch utility shall
>> # strip components from the beginning of each pathname (depending on the
>> # presence or value of the -p option), then test for the existence of
>> # both files in the current directory (or the directory specified by
>> # the -d option). If both files exist, the patch utility shall assume
>> # that no pathname can be obtained from this step.
>
>That part of POSIX.2-1992 is obsolescent. GNU "patch" attempts to
>conform to the latest POSIX draft, not with POSIX.2-1992. That
>appears to explain the discrepancy that you're observing.
>
>Here is the contents of the "Filename Determination" part of the
>latest POSIX draft (POSIX 1003.1-200x Draft 7).
[snip]
Right, thanks. Apologies for wasting your time.
What I was actually interested in dealing with originally was
Debian bug report 49481:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=49481
where patch doesn't handle some cvs diff output because it trusts
old/new over Index and there's no way to tell patch to ignore the
wrong information even if the patch-applier knows it's wrong.
(The obsolete POSIX rules get this case right, largely by fluke :->)
It might be nice to have some options to say 'skip step n of
the POSIX-mandated filename discovery process', effectively.
Does this seem like a useful feature?
Peter Maydell
- Re: GNU patch not completely posix compliant in --posix mode,
Peter Maydell <=