From owner-freebsd-ports@FreeBSD.ORG Mon Aug 30 07:33:48 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 A7B0E10656A8; Mon, 30 Aug 2010 07:33:48 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id D54DF8FC0C; Mon, 30 Aug 2010 07:33:46 +0000 (UTC) Received: by ewy4 with SMTP id 4so3141667ewy.13 for ; Mon, 30 Aug 2010 00:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=lQ5LJuMbEyMGknvIecyissBC+IvGQQcrdf5u9sMLYh4=; b=rjgS+yyqD/dMzuYmgc6ZmWFSv5R6SmCblsJ5iT4jrE+gohna9D19VvXrKKKpBUEM9P 0aQyK8BmXJAZBjQAq6Diz3wXCzVMVc+w35piRlp5iJ4bqJW/2RT89RKwkxDbUFWKLNQJ Gor0G5vyGWtdAPp8oiUuPvKsXjkP2p39yoSsk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=jOkd6DNJzFiFo00yNI0u0s97dW5lzMwahQDCccHCdBHKeaPVkE3wd/Xtyl7ls+T9lR hLCkOk4NjlaAlbeAvQun6EqQIf69PbVQdsqd0jtFz2+LHibbetTt2myaaOQUb3PbYX+S PYaSi3c89U+p9u+/en31E26huife6VhR2SnOw= Received: by 10.227.138.84 with SMTP id z20mr4195341wbt.214.1283153625773; Mon, 30 Aug 2010 00:33:45 -0700 (PDT) Received: from localhost ([85.17.254.135]) by mx.google.com with ESMTPS id m25sm6105158wbc.1.2010.08.30.00.33.43 (version=SSLv3 cipher=RC4-MD5); Mon, 30 Aug 2010 00:33:44 -0700 (PDT) From: Anonymous To: Bapt References: <20100819143830.GJ35140@azathoth.lan> <4C6DA0FA.7080203@DataIX.net> <20100820124332.GB1786@azathoth.lan> Date: Mon, 30 Aug 2010 11:27:53 +0400 In-Reply-To: <20100820124332.GB1786@azathoth.lan> (bapt@freebsd.org's message of "Fri, 20 Aug 2010 14:43:32 +0200") Message-ID: <86lj7o7e6e.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Florent Thoumie , Julien Laffaye , David Forsythe , Garrett Cooper , Tim Kientzle , Ivan Voras , freebsd-ports@freebsd.org Subject: Re: what next for the pkg_install rewrite 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: Mon, 30 Aug 2010 07:33:48 -0000 Bapt writes: > On Fri, Aug 20, 2010 at 02:09:59PM +0200, Julien Laffaye wrote: >> On Fri, Aug 20, 2010 at 12:00 PM, Ivan Voras wrote: >> > > 2. XML is a bad idea. Great in theory, wonderful in my browser, but a >> > > bloated plaintext file with a lot of complexity. I would prefer a >> > > database solution that could be dumped to a simple text file format if >> > > needed. >> > >> > XML, at least in my proposal, would not be used for the system package >> > database, but would replace (either in part or all with a single file) >> > today's "+" files in the packages, together with other purposes where >> > some metadata transfer is required. >> > >> > That said, I would also be happy with other self-described formats >> > like JSON. XML is the front runner because it's more standard >> > (industry standard, whether someone likes this fact or not!) and there >> > is already a parser in base. >> > >> >> The pro of XML here is that we have a parser in base, The con is its >> verbosity. But anyway the manifest is not meant to be human readable. >> Nevertheless, I prefer JSON, because it's less complex than XML and we can >> have a parser/emiter in a single 500SLOC .c file. >> And it looks sexier than XML, eh : http://pastebin.com/8hzPSSJC > > > +1 for JSON, XML would have been interesting if we add a validating parser in > base which would have help us to verify the package integrity, but expat isn't a > good validating parser. writting a json parser/emiter is easy, and there already > exists tons of BSDL friendly license JSON parser. For exemple we could import > yajl (BSDL) into base or use cJSON (MIT) which consist in one simple C + header > file We can as well use Lua tables to store package database. Their syntax is close to JSON. Besides, I think it's better to divorce ports from base so that pkg_* tools can evolve faster and are not limited to dependencies from base. The only thing we'd need to leave in base is smth like pkg_bootstrap. IMO, this chicken and egg problem is getting quite annoying.