From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MPkJf-0007ZG-V0 for garchives@archives.gentoo.org; Sat, 11 Jul 2009 21:41:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 050CFE0300; Sat, 11 Jul 2009 21:41:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id BAB02E0300 for ; Sat, 11 Jul 2009 21:41:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 6349A663FF for ; Sat, 11 Jul 2009 21:41:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: -1.481 X-Spam-Level: X-Spam-Status: No, score=-1.481 required=5.5 tests=[AWL=0.051, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1, RCVD_NUMERIC_HELO=2.067] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TdiVIiqm+YZb for ; Sat, 11 Jul 2009 21:41:00 +0000 (UTC) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 8EDB9652FA for ; Sat, 11 Jul 2009 21:40:57 +0000 (UTC) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MPkJT-0006Nh-L4 for gentoo-dev@gentoo.org; Sat, 11 Jul 2009 21:40:55 +0000 Received: from 91.85.187.107 ([91.85.187.107]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 11 Jul 2009 21:40:55 +0000 Received: from slong by 91.85.187.107 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 11 Jul 2009 21:40:55 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-dev@lists.gentoo.org From: Steven J Long Subject: [gentoo-dev] Re: Re: Inviting you to project "PackageMap" Followup-To: gmane.linux.gentoo.devel Date: Sat, 11 Jul 2009 22:38:55 +0100 Organization: Friendly-Coders Message-ID: <3637194.4P3UzGsuaa@news.friendly-coders.info> References: <4A3206DA.3090907@hartwork.org> <15e53e180906120130md68cd94nba61fa5560c73eb4@mail.gmail.com> <1722869.hSdHM5OqYb@news.friendly-coders.info> <4A332322.60600@hartwork.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 91.85.187.107 Sender: news Cc: packagekit@lists.freedesktop.org X-Archives-Salt: 1e050848-d730-4994-8c32-74c2e1402e5e X-Archives-Hash: 7dfd0ece23b7b6ea3909617b73869334 Sorry for delay in answering this one, been up to here with RL, and I didn't have access to the debian and BSD bookmarks. Sebastian Pipping wrote: > Steven J Long wrote: >> You might as well use Gentoo's version specification for your internal >> format, as it's the most comprehensive. The most you need to add is >> debian epochs. > > I'm not sure what you are referring to. > Please share more details or pointers. > There's two aspects: the category grouping, and the version specifier. Most distros have a flat namespace, which gets kinda hairy. One level of grouping above that makes a BIG difference. If you take a look here: http://sources.gentoo.org/viewcvs.py/portage/main/trunk/pym/portage/versions.py?view=markup you can see the version RE; note it can handle arbitrary levels of patch (pre etc.) This is what we use in update[1] to split an arbitrary CPV: CPV='^(.*-.*|virtual)/(.*)-([0-9]+)((\.[0-9]+)*)([a-z]?)((_(pre|p|beta alpha|rc)[0-9]*)*)(-r([0-9.]+))?$' (That's all one line.) If it doesn't match that, the CPV is not valid, and with the one RE match, we have all the constituent parts, though we don't often compare versions and handle that separately. We've removed cvs. prefix since it's supposed to be deprecated, and added the inter-rev bit for prefix portage. cvs. is still kept in our version comparison code as it's a pita to rewrite, and we're waiting for some sort of outcome to handling vcs builds; simply swapping two letters is clearly optimal. The "official" reasons given for deprecating cvs. were 1) no-one knew about it. 2) those who did apparently found it "hard to deal with" though one could be forgiven for thinking that's due to novelty; -rNN is supposedly "hard" too. 3) it's vendor-specific. We removed it for getCPV() as we call that function a *lot*; much more often than verCompare() and every little bit helps. Adding it back is a doddle. A prefix here is more efficient than yet another suffix. I've yet to see an upstream version that can't be handled adequately by the Gentoo versioning scheme. Granted you get the odd insane upstream; in those kind of cases, I'd rather go by date (which can ofc be handled easily) or svn id. A distro really should not have any need to push a version more than once a day, and the distro release bit at the end allows one to deal with the occasional mistake. Ultimately it's down to the maintainer, ofc, but I'd question the stability of a project that releases more than once per day; it does occasionally happen with bugfixes, usually with some sort of patch revision. WRT debian epochs, they're described here: http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version You should also take a look at how *BSD handle eg LIB_DEPENDS (the LDEPEND variable I've occasionally suggested in the past): http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-depend.html I personally am not too fussed about the other *_DEPENDS mentioned therein; you might want to add them for completeness. > >> XML was never meant for data-storage for such record-sets: it was >> designed for data *interchange* [..] > > Interesting point. What would you use as an alternative that > works well with a version control system? > Ah didn't realise you wanted to keep this all in a vcs. Personally I'd use a format similar to the metadata section part of an ebuild, so simple shell assignments. I wouldn't worry about whether strings are single or double-quoted (or even if they're quoted at all, myself); just ban all backslashes, and have some sort of script that runs to verify pre-commit. There's no need to start going off into some nutty anxiety attack about "oh but sh allows X and BASH allows Y" imo; just verify that the data lexes fine: people make mistakes all the time. (It's only mildly tricky in C, so should be easy enough however you implement.) Having said that, XML is fine for microformats; Gentoo GuideXML is one of the nicest applications of XML I've seen (and was a factor in us going with Gentoo, believe it or not.) Nor is this a massive dataset. I just think most of your users will be more comfortable. Good luck with it, whatever format you go with. HTH, Steve. [1] http://forums.gentoo.org/viewtopic-t-546828.html -- the version on there is very much out of date (I'll get that modded soon, Naib ty for your lovely comments;) so if any Gentoo-user does want to try it: git clone git://weaver.gentooenterprise.com/update.git Please be aware this is under AGPL3+ for non-commercial use only, so if that bothers you, don't clone it. (Written with a work colleague, on work time. He wasn't happy with CC-NCSA as he's committed to FSF for some reason, a stance I have to say I am coming to agree with, but that's another [off;]topic.) -- #friendly-coders -- We're friendly but we're not /that/ friendly ;-)