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

Re: changes file format



Bruce Perens writes ("Re: changes file format "):
> ian@chiark.chu.cam.ac.uk said:
> > Are you saying it looks anywhere near as nice as mine ?
> 
> Well, I think it looks awful, but I will accept your format simply
> to end this argument if you or someone else
> will write and maintain the parser for it and
> an automated tool to generate it.

Sorry to labour the point, but when you say "it looks awful" do you
mean from a human's point of view or from the point of view of making
it easy to write a parser ?

One of the main advantages of my format is that it can be used in
changelogs too.

How about the following proposal:

 Release announcements are prepared in whatever way the package
  maintainer likes, and submitted in a format that looks like yours.

 The announcements are reformatted into a format that looks like mine,
  before being posted (to the instant-updates list, see below).  When
  the package is moved into view the `human-readable' announcement is
  added to the global system changelog file, and posted to
  debian-changes (or whatever the updates-when-available list is).

I can write a program to convert between the two formats, so that if
you edit your changelog in my format you can generate the release
announcement in dchanges format and never have to read it.  This will
localise the problems with badly-formatted human-readable changelogs
to the package maintainer.

The only thing I think I need to do this is a way to represent a blank
line in the dchanges format's "Changes" field.

> I don't see how you could seriously propose a context-dependent parse, but
> I'm sick of the argument.

I'll write a grammar for it if you *really* want me to, but it seems
like a waste of effort.  Actually, here you are:

 release-announcement:  change-log md5sums listing

 change-log:            header change-lines footer

 change-lines:          change-line change-lines | ""

 change-line:            "  " rest-of-line end-of-line | end-of-line

 end-of-line:           " " end-of-line | "\t" end-of-line | "\n"

 rest-of-line:          <any character except "\n"> *

 header:                package-name " (" package-version ")"
                        status-flags priority-flags end-of-line

 package-name:          <letter or digit or "-_+.@:=%"> +

 package-version:       <any character except "\n", "(", ")"> +

 word:                  <letter>  <letter or digit or "-"> *

 status-flags:          " " status-flag status-flags | ""

 status-flag:           "BETA" | "ALPHA" | "stable" |
                        "experimental" | word

 priority-flags:        "; " priority-setting other-priorities

 priority-setting:      "priority=" priority-value

 priority-value:        "LOW" | "MEDIUM" | "HIGH" | "URGENT" | word

 other-priorities:      " (" <any character except ")","\n"> + ")"
                        | ""

 footer:                " -- " maintainer-info " <"
                        maintainer-info ">  " rfc822-date end-of-line

 maintainer-info:       <any character except "\n" or "<" or ">"> +

 rfc822-date:           <the date specification from RFC822>

 md5sums:               ( md5sum "  " filename ) +

 listing:               <the output of `ls -l'>

See my comments about the ls output in another message.

Ian.


Reply to: