Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28803/perlmod/Fink
Modified Files:
ChangeLog Package.pm
Log Message:
always use new cache files
Index: Package.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Package.pm,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -d -r1.133 -r1.134
--- Package.pm 27 Apr 2005 01:57:31 -0000 1.133
+++ Package.pm 27 Apr 2005 21:11:56 -0000 1.134
@@ -632,23 +632,23 @@
sub update_index {
my ($class, $idx, $info, @pvs) = @_;
+ # Always use a new file, so an old fink doesn't accidentally read a
newer
+ # file in the same place.
+
+ # TODO: This leaves old cache files sitting around, perhaps if the atime
+ # gets old enough we should delete them?
+ my $cidx = $idx->{next_idx}++;
+
+ # Split things into dirs
+ my $dir = sprintf "%03d00", $cidx / 100;
+ my $cache = $class->db_dir . "/$dir/$cidx";
+
my %new_idx = (
inits => { map { $_->get_fullname => $_->get_init_fields } @pvs
},
+ cache => $cache.
);
- if (defined $idx->{infos}{$info}) {
- @{ $idx->{infos}{$info} }{keys %new_idx} = values %new_idx;
- } else {
- # Split things into dirs
- my $cidx = $idx->{next_idx}++;
- my $dir = sprintf "%03d00", $cidx / 100;
- my $cache = $class->db_dir . "/$dir/$cidx";
-
- $new_idx{cache} = $cache;
- $idx->{infos}{$info} = \%new_idx;
- }
-
- return $idx->{infos}{$info};
+ return ($idx->{infos}{$info} = \%new_idx);
}
=item pass1_update
Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.980
retrieving revision 1.981
diff -u -d -r1.980 -r1.981
--- ChangeLog 27 Apr 2005 18:30:23 -0000 1.980
+++ ChangeLog 27 Apr 2005 21:11:56 -0000 1.981
@@ -1,5 +1,9 @@
2005-04-27 Dave Vasilevsky <[EMAIL PROTECTED]>
+ * Package.pm: Always use new cache files.
+
+2005-04-27 Dave Vasilevsky <[EMAIL PROTECTED]>
+
* Bootstrap.pm, Engine.pm, PkgVersion.pm, SelfUpdate.pm, Services.pm:
Use
-lockwait versions of dpkg and apt-get.
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits