From owner-freebsd-ports@FreeBSD.ORG Sun Jan 29 11:54:10 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 741B8106564A for ; Sun, 29 Jan 2012 11:54:10 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id E57E08FC16 for ; Sun, 29 Jan 2012 11:54:09 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [IPv6:2001:8b0:151:1:fa1e:dfff:feda:c0bb]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q0TBs1t3084309 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 29 Jan 2012 11:54:02 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: OpenDKIM Filter v2.4.3 smtp.infracaninophile.co.uk q0TBs1t3084309 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1327838042; bh=pjOK+lVsgTGoNq2VXErvjhmKS77hsEbTgdml3Os4xkM=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type; b=oFxPOIBIR42nhk/dNSnVJ9CpcuUciANRVNxm3iZcVOc+X5iuJbydcguZedmqNak3o LOLKa++giqbYv6H8K769L/HUal3q2crmzY4Eaug2XSeKixr1SbImR9deb6Xecnh61G ru3n8t1XGWhqCkBJAO+gmDBFMcPOb2a/UL0PUHfM= Message-ID: <4F253351.8090308@infracaninophile.co.uk> Date: Sun, 29 Jan 2012 11:53:53 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: rflynn@acsalaska.net References: <4F199672.8050008@infracaninophile.co.uk> <3356.46.129.107.107.1327716347.squirrel@mymail.acsalaska.net> In-Reply-To: <3356.46.129.107.107.1327716347.squirrel@mymail.acsalaska.net> X-Enigmail-Version: 1.3.4 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig50ACF941B14A166B1E81D16C" X-Virus-Scanned: clamav-milter 0.97.3 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk 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: Sun, 29 Jan 2012 11:54:10 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig50ACF941B14A166B1E81D16C Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 28/01/2012 02:05, rflynn@acsalaska.net wrote: > I haven't looked in detail - perl has to leave my head - but what I thi= nk > is a good feature for a database to handle is to find outdated distfile= s. >=20 > Since the relationship between a portorigin and it's distfile(s) is not= > available otherwise. I realize portmaster uses /var/db/ports for it, ye= t > if you share $PORTSDIR but not $PORT_DBDIR (different machines, differe= nt > 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 change= d > distfile). I've just added tables to handle distinfo data to portindexdb. Get release 972 from http://www.infracaninophile.co.uk/articles/portindexdb.html while it's hot. And thank you very much for the suggestion. Now for the weasely-worded bit. portindexdb takes a snapshot of the current state of the ports tree, so finding outdated or broken distfiles is a matter of calculating the checksums of the files you find in /usr/ports/distfiles and picking out the ones where the checksum is unknown in the database. (Actually scripting up this is left as an exercise for the student.) *Except* some ports use alternate distinfo files depending on the current system architecture, so beware: this method may flag up some good distfiles if you share your ${PORTSDIR} between machines of different architectures. It's relatively few things and mostly stuff like pre-compiled Linux binaries that are affected. Enjoy, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enig50ACF941B14A166B1E81D16C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8lM1gACgkQ8Mjk52CukIx+QQCfecIBBAVMhswOzPblImSbvS7u q+IAn1GjZgMVO4QDaymLEJUcB8Ly/lOJ =PjKt -----END PGP SIGNATURE----- --------------enig50ACF941B14A166B1E81D16C--