OpenCSW Bug Tracker


Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003477 [pkg_get] regular use minor always 2009-03-20 19:06 2009-03-24 10:33
Reporter iddecker View Status public  
Assigned To bonivart
Priority normal Resolution fixed  
Status closed  
Summary 0003477: catalog is always updated if catalog on mirror is old
Description when the catalog on the mirror is older than 14 days, the catalog is always updated, because the downloaded catalog file is older than 14 days
Additional Information solution: touch catalog after download

patch:

--- /opt/csw/bin/pkgutil 2009-03-19 14:16:33.000000000 +0100
+++ pkgutil_ 2009-03-20 19:01:54.083912137 +0100
@@ -66,9 +66,9 @@
 
 sub check_catalog {
   my($always) = @_;
- my $age = 0;
 
   foreach my $url (@mirror) {
+ my $age = 0;
     my $filename = mangle_url($url);
     my $age_i = -M $filename if (-r $filename);
     $age = $age_i if defined($age_i) && $age_i > $age;
@@ -192,6 +192,7 @@
   } else {
     $status = system("$wget $wgetopts -O $filename $url/catalog");
   }
+ system("touch $filename");
   if ($status) {
     print "\nFetching of catalog failed.\n";
     exit 1;
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0005696)
bonivart (developer)
2009-03-23 15:09

I can see that this is a problem if you use the stable catalog which doesn't change often, then you will have to download it every time anyway. I will fix this. Thanks for letting me know.
(0005713)
bonivart (developer)
2009-03-23 21:00

I have committed a change into svn (r14).
(0005718)
bonivart (developer)
2009-03-24 10:33

The fix has been tested and will be in v1.5.


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker