[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Mon Sep 2 10:41:54 EDT 2013


raeburn		Mon Sep  2 14:41:54 2013 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - For 2.11
    - Backport 1.1238.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1172.2.33 loncom/lonnet/perl/lonnet.pm:1.1172.2.34
--- loncom/lonnet/perl/lonnet.pm:1.1172.2.33	Sun Sep  1 23:24:05 2013
+++ loncom/lonnet/perl/lonnet.pm	Mon Sep  2 14:41:53 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1172.2.33 2013/09/01 23:24:05 raeburn Exp $
+# $Id: lonnet.pm,v 1.1172.2.34 2013/09/02 14:41:53 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -11777,30 +11777,12 @@
     my (%chksum,%revnum);
     if (ref($lines) eq 'ARRAY') {
         chomp(@{$lines});
-        my $versions = shift(@{$lines});
-        my %supported;
-        if ($versions =~ /^VERSIONS\:([\w\.\,]+)$/) {
-            my $releaseslist = $1;
-            if ($releaseslist =~ /,/) {
-                map { $supported{$_} = 1; } split(/,/,$releaseslist);
-            } elsif ($releaseslist) {
-                $supported{$releaseslist} = 1;
-            }
-        }
-        if ($supported{$release}) {
-            my $matchthis = 0;
+        my $version = shift(@{$lines});
+        if ($version eq $release) {
             foreach my $line (@{$lines}) {
-                if ($line =~ /^(\d[\w\.]+)$/) {
-                    if ($matchthis) {
-                        last;
-                    } elsif ($1 eq $release) {
-                        $matchthis = 1;
-                    }
-                } elsif ($matchthis) {
-                    my ($file,$version,$shasum) = split(/,/,$line);
-                    $chksum{$file} = $shasum;
-                    $revnum{$file} = $version;
-                }
+                my ($file,$version,$shasum) = split(/,/,$line);
+                $chksum{$file} = $shasum;
+                $revnum{$file} = $version;
             }
             if (ref($hashref) eq 'HASH') {
                 %{$hashref} = (
@@ -11815,7 +11797,10 @@
 
 sub fetch_dns_checksums {
     my %checksums;
-    &get_dns('/adm/dns/checksums',\&parse_dns_checksums_tab,1,1,
+    my $machine_dom = &Apache::lonnet::host_domain($perlvar{'lonHostID'});
+    my $loncaparev = &get_server_loncaparev($machine_dom);
+    my ($release,$timestamp) = split(/\-/,$loncaparev);
+    &get_dns("/adm/dns/checksums/$release",\&parse_dns_checksums_tab,1,1,
              \%checksums);
     return \%checksums;
 }




More information about the LON-CAPA-cvs mailing list