How about checking if the new data is the same as the old data - if it is, then ignore the attempt to add duplicate data, if not, then die.
Or can you be *sure* that the data will always be the same? Tim On 2006-09-04, at 09:44 , [EMAIL PROTECTED] wrote: > Message: 8 > Date: Sun, 03 Sep 2006 19:44:49 -0400 > From: Benjamin Reed <[EMAIL PROTECTED]> > Subject: [Fink-devel] "node exists" errors > To: fink-devel <fink-devel@lists.sourceforge.net> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > I did some investigation of the node exists errors, and I think > they are > completely bogus (at least, while I agree we shouldn't have gotten to > that point in the code path in the first place, I believe it is > entirely > legal to ignore the error). > > I've done some Data::Dumper debugging, and basically I think what's > happening is as it's going through and making the list of packages to > investigate for dependencies, it's somehow hitting a package twice. > When it's time to add it to the hash of things to check, it says "I > already have this in the hash" and it bombs. > > The stuff that goes into the hash is generated like this: > > @{$deps->{$dname}}[ PKGNAME, PKGOBJ, PKGVER, OP, FLAG ] = ( > $dname, Fink::Package->package_by_name($dname), > $dp, $OP_INSTALL, 2 > ); > > ...by the time it comes up, there is no way this information won't > always be identical to what's in the hash already. > "Fink::Package->package_by_name($dname)" interrogates the index, which > is already up-to-date and unchanging by the time this loop is > encountered, so at worst, we will be checking postgresql81-dev if it > matches the dependencies multiple times. > > I think the "node exists" die should instead be replaced with "next". > > Empirical testing with a reproducible error on my dev system implies > this is safe, as well. :) > > Objections? > > -- > Benjamin Reed a.k.a. Ranger Rick > http://ranger.befunk.com/ ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel