From owner-freebsd-ports@FreeBSD.ORG Sat Jan 28 02:05:48 2012 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 7067B106566C for ; Sat, 28 Jan 2012 02:05:48 +0000 (UTC) (envelope-from rflynn@acsalaska.net) Received: from ingra.acsalaska.net (ingra.acsalaska.net [209.112.173.251]) by mx1.freebsd.org (Postfix) with ESMTP id 3E8478FC0A for ; Sat, 28 Jan 2012 02:05:47 +0000 (UTC) Received: from mymail.acsalaska.net (polarbear.acsalaska.net [216.67.61.193]) by ingra.acsalaska.net (8.14.4/8.14.4) with ESMTP id q0S25kNh051409; Fri, 27 Jan 2012 17:05:47 -0900 (AKST) (envelope-from rflynn@acsalaska.net) Received: from 46.129.107.107 (SquirrelMail authenticated user rflynn@acsalaska.net) by mymail.acsalaska.net with HTTP; Fri, 27 Jan 2012 17:05:47 -0900 (AKST) Message-ID: <3356.46.129.107.107.1327716347.squirrel@mymail.acsalaska.net> In-Reply-To: <4F199672.8050008@infracaninophile.co.uk> References: <4F199672.8050008@infracaninophile.co.uk> Date: Fri, 27 Jan 2012 17:05:47 -0900 (AKST) From: rflynn@acsalaska.net To: "Matthew Seaman" User-Agent: SquirrelMail/1.4.13 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (ingra.acsalaska.net [209.112.168.121]); Fri, 27 Jan 2012 17:05:47 -0900 (AKST) X-ACS-Spam-Status: no X-ACS-Scanned-By: MD 2.67; SA 3.3.0; spamdefang 1.122 Cc: freebsd-ports Subject: Re: Doing SQL to the FreeBSD ports index 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: Sat, 28 Jan 2012 02:05:48 -0000 Hi, > Apropos nothing much at all, but congruent with some of the discussion > going on in this list at the moment, I've been playing around loading > ports index related data into a RDBMS and querying that to pull out > interesting factoids, or indeed a complete INDEX file. I didn't start > doing this with any idea other than my own edification but now it seems > it might be vaguely useful here and there, so I've stuck a copy on my > website: > > http://www.infracaninophile.co.uk/articles/portindexdb/ > > I'd be happy to hear from anyone using this, or receive bug reports / > feature requests. I haven't looked in detail - perl has to leave my head - but what I think is a good feature for a database to handle is to find outdated distfiles. Since the relationship between a portorigin and it's distfile(s) is not available otherwise. I realize portmaster uses /var/db/ports for it, yet if you share $PORTSDIR but not $PORT_DBDIR (different machines, different requirements) then this method gets ugly fast. Quick parse of distinfo should do the trick. Record the hash and you can get bonus points for indicating hash errors (incomplete aborted downloads or upstream changed distfile). -- Mel