Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Aug 2010 11:27:53 +0400
From:      Anonymous <swell.k@gmail.com>
To:        Bapt <bapt@freebsd.org>
Cc:        Florent Thoumie <flz@freebsd.org>, Julien Laffaye <jlaffaye@freebsd.org>, David Forsythe <dforsyth@freebsd.org>, Garrett Cooper <gcooper@freebsd.org>, Tim Kientzle <kientzle@freebsd.org>, Ivan Voras <ivoras@freebsd.org>, freebsd-ports@freebsd.org
Subject:   Re: what next for the pkg_install rewrite
Message-ID:  <86lj7o7e6e.fsf@gmail.com>
In-Reply-To: <20100820124332.GB1786@azathoth.lan> (bapt@freebsd.org's message of "Fri, 20 Aug 2010 14:43:32 %2B0200")
References:  <20100819143830.GJ35140@azathoth.lan> <AANLkTimY=FJas-oXkWwO07QtaD%2BGrLockgJ_SZQJ7UHM@mail.gmail.com> <AANLkTimhh2vOtXUb-frzWcZmANWyEC7oPtTgepzvOtSB@mail.gmail.com> <4C6DA0FA.7080203@DataIX.net> <AANLkTi=h_GdAFbZ2X0agCAtyLLiwNrMoLx_ZunhBBx2=@mail.gmail.com> <AANLkTinn4utHttMPsCN1GKp1dTPOdTJAtLgG3m8BfLgw@mail.gmail.com> <AANLkTi=F_sbOWXkXkqAZ00xu9E44m8gPhD39kGet01vu@mail.gmail.com> <AANLkTi=1ons1-6xf83VTNZfQdhzaZpyA7w8U6z6VQ0-Q@mail.gmail.com> <20100820124332.GB1786@azathoth.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
Bapt <bapt@freebsd.org> 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 <ivoras@freebsd.org> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86lj7o7e6e.fsf>