changeset 15966:d56dd6794a20

maint: periodic merge of stable to default
author John W. Eaton <jwe@octave.org>
date Fri, 18 Jan 2013 16:48:12 -0500
parents f6d755f2ae9e (current diff) 7ad3eea8a3af (diff)
children 139f4b19a3ac
files scripts/pkg/pkg.m scripts/pkg/private/get_forge_pkg.m scripts/pkg/private/list_forge_packages.m
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/pkg/private/get_forge_pkg.m	Fri Jan 18 11:33:42 2013 -0800
+++ b/scripts/pkg/private/get_forge_pkg.m	Fri Jan 18 16:48:12 2013 -0500
@@ -39,7 +39,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)) = [];
@@ -52,17 +52,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{:});
--- a/scripts/pkg/private/list_forge_packages.m	Fri Jan 18 11:33:42 2013 -0800
+++ b/scripts/pkg/private/list_forge_packages.m	Fri Jan 18 16:48:12 2013 -0500
@@ -23,7 +23,7 @@
 ## @end deftypefn
 
 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