At 10:45 Uhr -0400 16.05.2002, Chris Devers wrote: >On Thu, 16 May 2002, Bernd Kuemmerlen wrote: > >> Use of uninitialized value in numeric gt (>) at >>/sw/lib/perl5/Fink/Package.pm line 377, <SW_VERS> line 2. > >Out of curiosity, what does line 377 of that file look like for you? What >is being evaluated there that Perl doesn't like in this context? My >version -- which is probably but not necessarily identical to yours -- has >this subroutine there (line 377 overall is line 3 here): > > sub process_find { > if (/^.*\.info\z/s ) { > if ( ( (lstat($_))[9] > $db_mtime ) || ( (stat($_))[9] > $db_mtime ) ) { > $db_outdated = 1; > $File::Find::prune = 1; > } > } > } > >$db_mtime is set to zero on line 57, and potentially altered at line 327 >in a nested-if block that's a bit too long to bother pasting here. Looks >like the problem then isn't $db_mtime, but the $_ temp variable passed in >to process_find() -- and the only other place *that* shows up is in the >same nested-if block, at line 328. Oh hell I'll paste it: > > # If we have the Storable perl module, try to use the package index > if (-e "$basepath/var/db/fink.db") { > eval { > require Storable; > > # We assume the DB is up-to-date unless proven otherwise > $db_outdated = 0; > > # Unless the NoAutoIndex option is set, check whether we >should regenerate > # the index based on its modification date and that of the >package descs. > if (not $config->param_boolean("NoAutoIndex")) { >*-> $db_mtime = (stat("$basepath/var/db/fink.db"))[9]; >*-> find (\&process_find, "$basepath/fink/dists"); > } > > # If the index is not outdated, we can use it, and thus safe a >lot of time > if (not $db_outdated) { > %package_hash = %{Storable::retrieve("$basepath/var/db/fink.db")}; > my ($pkgtmp); > foreach $pkgtmp (keys %package_hash) { > push @package_list, $package_hash{$pkgtmp}; > } > } > } > } > > >That confuses me -- is process_find not being passed in a variable? Should >it be, if it isn't? > >This is where I get bad at untangling where things are going...
Well, Fink uses the standard perl module File::Find in the lines you mark. The "find" function iterates over all files in the given location and calls for each file the "process_find" method, which in turn checks whether it's an .info file that is newer than the package cache. In that case, search is aborted and the cache is forced to be rebuilt. Ont thing that might happen is that somehow a file with a space in it ended up in /sw/find/dists/ - since we are not quoting $_ here before passing it to stat/lstat, that could explain the warning. Cheers, Max -- ----------------------------------------------- Max Horn Software Developer email: <mailto:[EMAIL PROTECTED]> phone: (+49) 6151-494890 _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] _______________________________________________ Fink-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/fink-devel