changeset 15965:7ad3eea8a3af stable

use packages.octave.org instead of sourceforge in pkg.m * pkg.m (list_forge_packages): Download package list from packages.octave.org instead of octave.sourceforge.net. * get_forge_pkg.m (get_forge_pkg): Likewise, for package index.html files and sources.
author John W. Eaton <jwe@octave.org>
date Fri, 18 Jan 2013 16:42:05 -0500
parents a86275134ffc
children d56dd6794a20 d31a39a0ac77
files scripts/pkg/pkg.m scripts/pkg/private/get_forge_pkg.m
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/pkg/pkg.m	Mon Jan 14 20:24:32 2013 -0500
+++ b/scripts/pkg/pkg.m	Fri Jan 18 16:42:05 2013 -0500
@@ -2416,7 +2416,7 @@
 endfunction
 
 function list = list_forge_packages ()
-  [list, succ] = urlread ("http://octave.sourceforge.net/list_packages.php");
+  [list, succ] = urlread ("http://packages.octave.org/list_packages.php");
   if (succ)
     list = strsplit (list, " \n\t", true);
   else
--- a/scripts/pkg/private/get_forge_pkg.m	Mon Jan 14 20:24:32 2013 -0500
+++ b/scripts/pkg/private/get_forge_pkg.m	Fri Jan 18 16:42:05 2013 -0500
@@ -38,7 +38,7 @@
   name = tolower (name);
 
   ## Try to download package's index page.
-  [html, succ] = urlread (sprintf ("http://octave.sourceforge.net/%s/index.html", name));
+  [html, succ] = urlread (sprintf ("http://packages.octave.org/%s/index.html", name));
   if (succ)
     ## Remove blanks for simpler matching.
     html(isspace(html)) = [];
@@ -51,17 +51,17 @@
       ver = t{1}{1};
       if (nargout > 1)
         # Build download string.
-        urlbase = "http://downloads.sourceforge.net/octave/%s-%s.tar.gz?download";
-        url = sprintf (urlbase, name, ver);
-        ## Verify that the string exists on the page.
-        if (isempty (strfind (html, url)))
+        pkg_file = sprintf ("%s-%s.tar.gz", name, ver);
+        url = cstrcat ("http://packages.octave.org/download/", pkg_file);
+        ## Verify that the package string exists on the page.
+        if (isempty (strfind (html, pkg_file)))
           warning ("get_forge_pkg: download URL not verified");
         endif
       endif
     endif
   else
     ## Try get the list of all packages.
-    [html, succ] = urlread ("http://octave.sourceforge.net/packages.php");
+    [html, succ] = urlread ("http://packages.octave.org/packages.php");
     if (succ)
       t = regexp (html, "<div class=""package"" id=""(\\w+)"">", "tokens");
       t = horzcat (t{:});