I was unable to run ltspadmin no net connection.  With the attached
patch, it can work using files only in the cache area.  This patch is
against ltsputil 0.9 (which has ltspadmin 0.11).

-- 
A new cognitive theory of emotion, http://openheartlogic.org
--- ltspadmin   Mon Aug 16 11:02:30 2004
+++ /usr/sbin/ltspadmin Sat Aug 21 13:37:57 2004
@@ -1081,6 +1081,12 @@
 
   header();
 
+  my $document;
+  my $fullpath   = $cachedir . "/index.html";
+  if (-f $fullpath) {
+      $document = join('', `cat $fullpath`);
+  } else {
+
   printf("\n\nRetrieving list of packages from $pkg_source...");
 
   #
@@ -1092,6 +1098,7 @@
     printf("Status: $http_status\n");
     return undef;
   }
+  }
 
   for my $key (keys %components){
     $components{$key}->{updates_avail} = 0;
@@ -1121,7 +1128,15 @@
     if( $url =~ m/.*\.ltsp$/ ){
       my $absolute_url = URI->new_abs($url,$pkg_source)->canonical;
 
-      my $content = get_doc($absolute_url);
+      my $content;
+      my $cache_path = $url;
+      $cache_path =~ s,^.*/,,;
+      $cache_path = $cachedir . '/' . $cache_path;
+      if (-f $cache_path) {
+        $content = join '', `cat $cache_path`;
+      } else {
+        $content = get_doc($absolute_url);
+      }
       if( ! $content ){
         print("\nCould not get info from source!\n");
         return undef;

Attachment: signature.asc
Description: Digital signature

Reply via email to