Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jan 2012 11:53:53 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        rflynn@acsalaska.net
Cc:        freebsd-ports <freebsd-ports@freebsd.org>
Subject:   Re: Doing SQL to the FreeBSD ports index
Message-ID:  <4F253351.8090308@infracaninophile.co.uk>
In-Reply-To: <3356.46.129.107.107.1327716347.squirrel@mymail.acsalaska.net>
References:  <4F199672.8050008@infracaninophile.co.uk> <3356.46.129.107.107.1327716347.squirrel@mymail.acsalaska.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F253351.8090308>