Mercurial > forge
changeset 3005:0f4ecbbc9c0e octave-forge
Add language packages to packages page. Use the existing tarball of the package if available rather than create one (fixes issue with language package indexing)
author | adb014 |
---|---|
date | Tue, 30 Jan 2007 22:34:05 +0000 |
parents | ac25cdd8fcad |
children | bd57598d0424 |
files | www/build-www.py |
diffstat | 1 files changed, 16 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/www/build-www.py Tue Jan 30 22:23:44 2007 +0000 +++ b/www/build-www.py Tue Jan 30 22:34:05 2007 +0000 @@ -93,12 +93,20 @@ wd = os.getcwd(); name_version = desc['name'].lower() + "-" + desc['version']; - ## Create a tarball to be installed + ## Look for tarball in ../packages, and if it is found use it install_dir = wd + "/install/"; tarball = name_version + ".tar.gz"; - if (os.system("tar -zcf " + tarball + " -C " + packdir + "/.. " + p) != 0): - os.system("rm -rf " + tarball); - raise Exception("Can't create tarball"); + cmd = 'find ../packages -name ' + tarball + ' -prune -type f -print'; + have_tarball = None; + for file in os.popen(cmd).readlines(): + have_tarball = file[:-1]; + if (have_tarball): + shutil.copy2(have_tarball, tarball); + else: + ## Create a tarball to be installed + if (os.system("tar -zcf " + tarball + " -C " + packdir + "/.. " + p) != 0): + os.system("rm -rf " + tarball); + raise Exception("Can't create tarball"); ## Run octave installation command = 'pkg("prefix","' + install_dir + '"); '; @@ -273,6 +281,8 @@ index.write('are well tested and suited for most users.</li>\n'); index.write('<li><a href="#extra">Extra packages</a> contains packages that\n'); index.write("for various reasons aren't suited for everybody.</li>\n"); + index.write('<li><a href="#language">Native Translation packages</a> contains packages of\n'); + index.write("translations of the help strings of octave.</li>\n"); index.write('<li><a href="#nonfree">Non-free packages</a> contains packages\n'); index.write('that have license issues. Usually the packages themselves are\n'); index.write('Free Software that depend on non-free libraries.</li></ul>\n'); @@ -285,8 +295,8 @@ if (os.path.exists("INDEX")): os.system("rm -f INDEX"); - main_dirs = ["main", "extra", "nonfree"]; - headers = ["Main repository", "Extra packages", "Non-free packages"]; + main_dirs = ["main", "extra", "language", "nonfree"]; + headers = ["Main repository", "Extra packages", "Native Translations", "Non-free packages"]; for i in range(len(main_dirs)): name = main_dirs[i]; main_dir = "../" + name + "/";