portmaster: print /usr/ports/UPDATING on update
Eygene Ryabinkin
rea at freebsd.org
Tue Dec 28 08:49:33 UTC 2010
Peter, good day.
Tue, Dec 28, 2010 at 10:27:55AM +0200, Peter Pentchev wrote:
> - I personally would prefer a human-readable file (and yes, I *can*
> read XML; that doesn't mean it's easy or I *want* to :)
> ...so how about a JSON representation? Human-readable, human-editable,
> but still capable of being formalized and validated
JSON is a bit better (it has no tag overwhelming), but why not just
adopt the current mail-like entry format with each entry idented at two
spaces and preceded by a timestamp in format 'YYYYMMDD:'?
It is fairly easy to write a validator for such entries, since it is
rather simple to parse it and the validation logics will be programmed
in any way if we will still lean toward the human-readable format.
There is JSON Schema, but this way we will need something like
{{{
{"date": 20100101,
"affected":{
"category":"www",
"name":"elinks",
"version":"blah"
}
"body":"a long body comes here"
}
}}}
to validate the individual "category", "name", "version" and others.
Such entries are human-readable, but not as pretty as the current
UPDATING entries, in my opinion.
> - ...and as for an implementation, there is a mini-JSON library in
> NetBSD's netpgp implementation -
> src/crypto/external/bsd/netpgp/dist/src/libmj/ in NetBSD CVS
Does it has the schema validation? From what I seen at the NetBSD
CVS, there is not XML Schema implementation yet.
--
Eygene Ryabinkin ,,,^..^,,,
[ Life's unfair - but root password helps! | codelabs.ru ]
[ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
More information about the freebsd-ports
mailing list