RFC: yup config file format


Subject: RFC: yup config file format
From: Hollis Blanchard (hollis-lists@austin.rr.com)
Date: Fri Oct 19 2001 - 22:03:04 MDT


So here's the current yup.conf file:

.master http://www.yellowdoglinux.com/yup/yup.master.txt
.dist-option Yellow Dog Linux release 2.0
.arch-option ppc
.begin mirror-option
  .name Penn State Mirror
  .country USA
  .addr <url>
  .arch ppc SRPMS
.end

I'm not convinced all of that information is strictly necessary, but who
knows when we might want it in the future...

Here's what I'm thinking as a ConfigParser version:

[general]
master: http://www.yellowdoglinux.com/yup/yup.master.txt
dist-option: Yellow Dog Linux release 2.0
arch-option: ppc
version: 0.7.6

[repository1]
country: USA
name: Penn State Mirror
addr: <url>
arch: ppc SRPMS

[repository2]
...

The "version" tag is pretty important - as we can see we just broke the
config file format, so we need to know about that when it happens again in
the future (pretending the future yup will still use ConfigParser; if it
doesn't then a version tag doesn't help much :).

It could be assumed that all sections beginning with "repository" are
repositories (and so contain at a minimum a URL and an arches line).
ConfigParser will not complain if you have multiple sections of the same
name, so naming each simply "repository" won't work. OTOH, if you have a lot
of repositories numbering them might get annoying...

Another option is to assume that everything except "general" is a
repository, leading to sections like "[PennStateMirror]", "[iBiblio]", etc.
That might be a good idea, though spaces are not allowed in section names.

-Hollis



This archive was generated by hypermail 2a24 : Fri Oct 19 2001 - 21:14:03 MDT