# HG changeset patch # User John W. Eaton # Date 1358545325 18000 # Node ID 7ad3eea8a3afed28b9cf7cf972302b5a91eef2dc # Parent a86275134ffc17de1f5bcfe2cc35c36d636573b9 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. diff -r a86275134ffc -r 7ad3eea8a3af scripts/pkg/pkg.m --- 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 diff -r a86275134ffc -r 7ad3eea8a3af scripts/pkg/private/get_forge_pkg.m --- 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, "
", "tokens"); t = horzcat (t{:});