On Fri, Jun 24, 2005 at 04:50:50PM -0400, Alexander Strange wrote: > On Jun 24, 2005, at 4:43 PM, Alexander K. Hansen wrote: > > > >It sounds like the PDB is reindexing itself. > > Why does it empty the PDB before adding the new entries? If > Sourceforge's SQL server supports transactions, it's easy to do it > the right way, and even if it doesn't you could at least build a > temporary table to store them in.
We currently *do* use transactions to update the PDB. Here's the pseudocode: foreach distro ( 10.2-gcc3.3 10.3 10.4-transitional ) { cvs update stable and unstable dump package index as a file of SQL commands to update the PDB update the PDB (in a single transaction: DELETE all old, INSERT new) create file of SQL commands to set various flags ("most recent", etc). update the PDB (in a single transaction: UPDATE all flags) So if you happen to hit after the distro INSERTs but before the flag UPDATEs, for example, all pkgs may be in the PDB but none are marked as "most recent" (since the distro DELETE wiped the old records). The script runs via cron every 8 hours. Sometimes the scripts crash (SF resource shortage), so "happen to hit" could be an 8-hour time block (i.e., until the next run) if that's when it crashes. The script diagnostics go to the fink-auto-logs mailing list (on SF, archived on gmane) if you'd like to see the current state. You're welcome to look in scripts/pdb and xml/web/pdb in fink CVS and in my bin directory on SF's shell server to see the actual scripts used, and improve upon them. dan -- Daniel Macks [EMAIL PROTECTED] http://www.netspace.org/~dmacks ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel