From owner-freebsd-ports@FreeBSD.ORG Tue Dec 28 08:49:33 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C608106564A; Tue, 28 Dec 2010 08:49:33 +0000 (UTC) (envelope-from rea@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id C14578FC0A; Tue, 28 Dec 2010 08:49:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codelabs.ru; s=two; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date; bh=arZPE8whMDlgLSByhDSewsHL2NSEJSKDLYibombuZbo=; b=U5Q27KDWJjMNZYGn9gyFh4MWk4cEuF9ydCzL4IAlo4b742tV+PZbLcbUrFlkMIJuzCjUDEcYaizkdHZNL8gnGgAK1fLn9QUCA3n6+Ouuw/McwbJLJ9kxdBqSFLo2Q6BWGnfb3pkjJ8dOFP0fnYYXOeRy9Y7zA9LLNxrlnLBdsQK/lsWRpSwOzoRG5hsM5gn5WXOb0arPpIMP0zBQ/sy9yMrgdu289XuKu0DkCLVrknPiuq7zkyGt+232IJUZgB3z5AHPkTI/aMJGR6vzSpKDID+y41OtUOW2HYJPP5cKhOQPz873qOVEhZpv0kUc44rBtxK7RwhoXIDdO92lrS0m/Q==; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1PXVF6-000Hlc-BB; Tue, 28 Dec 2010 11:49:16 +0300 Date: Tue, 28 Dec 2010 11:49:14 +0300 From: Eygene Ryabinkin To: Doug Barton , David Demelier , freebsd-ports@freebsd.org Message-ID: References: <4D15D275.6000308@gmail.com> <4D194421.9080304@FreeBSD.org> <20101228082755.GA4381@straylight.ringlet.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101228082755.GA4381@straylight.ringlet.net> Sender: rea@codelabs.ru Cc: Subject: Re: portmaster: print /usr/ports/UPDATING on update X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2010 08:49:33 -0000 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 ]