Date: Sat, 23 Oct 2004 10:22:10 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Christopher Nehren <apeiron@comcast.net> Cc: freebsd-ports@freebsd.org Subject: Re: portindex -- the second coming. Message-ID: <20041023092209.GB41582@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <pan.2004.10.22.22.18.40.655164@comcast.net> References: <20041022153854.GA88362@happy-idiot-talk.infracaninophile.co.uk> <pan.2004.10.22.22.18.40.655164@comcast.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--zx4FCpZtqtKETZ7O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 22, 2004 at 06:18:41PM -0400, Christopher Nehren wrote: > On Fri, 22 Oct 2004 17:38:54 +0100, Matthew Seaman wrote: >=20 > > Dear all, > >=20 > > After the recent fun and games with the sysutils/portindex port by > > Radim Kolar, it seems there is a pent up demand for software that can > > maintain /usr/ports/INDEX without the hassle of going through a full > > 'make index' every time you want to update. > >=20 > > I've put together a few bits of perl to achieve that. Now I'm looking > > for people to try it out, send me feedback, bug reports, suggestions > > etc. To be beta testers in fact. >=20 > Yum. I also appreciate your choice of implementation language. :) > =20 > Although, actually, the main reason for why I liked portindex was that it > made an extremely detailed entry of every single port in a PostgreSQL > database. You could then make complex queries against that database using > SQL. You could see which ports you had installed which depended upon a > group of ports that matched a regex, for example (using subqueries -- > which is one of the reasons why I'm glad that PostgreSQL was chosen, > instead of a certain overly popular RDBMS which shall remain nameless > which lacks this feature). I don't know about others, but the SQL > interface is much more intuitive for me than using make syntax. And it's > more flexible, too. Not to mention that you can easily make graphs from > it, and so forth ... >=20 > If you're interested, I'd like to implement the RDBMS side of your > portindex replacement. >=20 > I'll take a look at your replacement later tonight, and shall give further > feedback either then or tomorrow. I have absolutely no objection to that, although what I wrote might not be the best starting point. I just dump what is essentially the 'make describe' output into the DB file as an opaque lump, and all of the dependency accumulation is done in the front end portindex process. What you're describing implies doing quite a bit more dissection of the data to fit it into a proper RDBMS schema, and having done that, moving much of the processing required into the SQL back end would only be sensible. I'd be against making it a requirement to install a RDBMS back end in order to use portindex though. I'm half minded to make the dependency on BerkeleyDB optional as well -- there's no reason why portindex shouldn't work using the standard DB_File bundled with perl, and the db1.86 code bundled with the system, so long as that annoying bug has been patched. I suspect that Dan Nelson, of freshports.org, probably has pretty much exactly the code you're looking for (PostgreSQL back end and all), although I have no idea if he would be prepared to release any of it. I also noticed this morning that there's already a FreeBSD::Ports module in the tree (by Tom Hukins) so I may have to do a bit of renaming. Plus I'll be putting out an update shortly so that it deals more gracefully with various ports breakages, like: % sudo ./portindex -o /usr/ports/INDEX Accumulating dependency information: .........[1000].........[2000]....= ....FreeBSD::Port::accumulate_dependencies: ja-sdic-2.1.2 claims to have a = dependency on /usr/ports/japanese/edict-sdic, but no such port is known at = FreeBSD/Ports/Tree.pm line 395 Can't call method "RUN_DEPENDS" on an undefined value at FreeBSD/Port.p= m line 201. and: % echo /usr/ports/japanese/sdic | ./cache-update -f plain cache-update:1: Updating cached data for /usr/ports/japanese/sdic ja-sdic-2.1.2: "/usr/ports/japanese/edict-sdic" non-existent -- depende= ncy list incomplete FreeBSD::Ports::Tree::make_describe():/usr/ports/japanese/sdic: make: b= ad exit status -- 256 at ./cache-update line 246 FreeBSD::Ports::Tree::make_describe():/usr/ports/japanese/sdic -- delet= ed from cache at ./cache-update line 246 Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --zx4FCpZtqtKETZ7O Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBeiLBiD657aJF7eIRArk+AKCCvg6XtOrZAtvwHnb8pj5f4jNBqgCfVVfO tyt//yBat92uxxW5zE7dQnk= =DgOh -----END PGP SIGNATURE----- --zx4FCpZtqtKETZ7O--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041023092209.GB41582>