WG15 Defect Report Ref: 9945-2-15
Topic: patch


This is an approved interpretation of 9945-2:1993.

.

Last update: 1997-05-20


								9945-2-15

	Class: The unaddressed issue

The standard does not speak to this issue, and as such no conformance
distinction can be made between alternative implementations based on this.
This is being referred to the Sponsors of the standard  for clarifying 
wording in the next amendment.

 _____________________________________________________________________________



	Topic:			patch
	Relevant Sections:	5.22.7.2


Defect Report:
-----------------------
 
          In  Section  5.22.7.3  -  Patch  Application,  the  standard 
          states: 
 
               For each hunk, the patch utility  shall  begin  to 
               search for the place to apply  the  patch  at  the 
               line number at the beginning of the hunk, plus  or 
               minus any offset used  in  applying  the  previous 
               hunk.  If lines matching the hunk context are  not 
               found, the patch utility shall scan both  forwards 
               and backwards at least 1000 bytes  for   2:  Shell   and 
          Utilities. 
 
          In Section 5.22.7.1 - Patchfile Format, the standard  states 
          that ``[e]ach patch shall contain  zero  or  more  lines  of 
          filename identification in the format produced  by  diff  -c 
          (see 4.17), and one or  more  sets  of  diff  output,  which 
          customarily are called ``hunks.''''  [Draft 12 of  ISO/IEC 
          9945-2:1993 (July 1992), p. 619, lines 3564-3566] 
 
          Since there is no restriction placed on  the  sets  of  diff 
          output, is the following a valid patch? 
 
               *** dummy~ Thu Nov 19 14:55:01 1992 
               --- dummy Thu Nov 19 14:55:01 1992 
               18d17 
               < Ababa 
               20c19,21 
 
 
 
          patch.2-3694               - 2 -             November 27, 1992 
 
 
 
               < abacus 
               --- 
               > Ababa 
               > abcaus 
               > test 
 
          If not, and ``hunks'' are only intended to b, or after each scan? 
 

WG15 response for 9945-2:1993 
-----------------------------------


The standard is silent on how a request (via -R) to reverse a patch
shall be processed; the standard thus allows any behavior by a
conforming implementation. Concern over the wording of this area has
been forwarded to the Sponsors of this standard.

Rationale for Interpretation:
-----------------------------

None.
 _____________________________________________________________________________