# HG changeset patch # User adb014 # Date 1160435718 0 # Node ID 4ea46b848cf2b33ecea5725dc91b6c90f9b4c912 # Parent ee8246279730c0d92d7b28f7ef06b32daec13edf No longer have global OCTAVE_PACKAGE_PREFIX. Use the 'prefix' directive to pkg to replae it diff -r ee8246279730 -r 4ea46b848cf2 packages/Makefile --- a/packages/Makefile Mon Oct 09 23:13:31 2006 +0000 +++ b/packages/Makefile Mon Oct 09 23:15:18 2006 +0000 @@ -59,7 +59,7 @@ @echo "Running test code for $(opkg) and its dependencies" ; \ cd sandbox; \ $(TOPDIR)/admin/mktests.sh code; \ - $(RUN_OCTAVE) --eval "pkg('load','all');addpath(genpath('./'),'-end');fntests" ; \ + $(RUN_OCTAVE) --eval "pkg('prefix',[pwd(),'/install']);pkg('load','all');addpath(genpath('./'),'-end');fntests" ; \ if [ ! -e $(TESTLOG) ]; then touch $(TESTLOG); fi ; \ cat fntests.log >> $(TESTLOG); \ cd .. @@ -74,11 +74,7 @@ cleancheck/%: @if [ -d sandbox/ ]; then rm -rf sandbox; fi ; \ - mkdir sandbox; \ - cd sandbox; \ - echo "global OCTAVE_PACKAGE_PREFIX;" > .octaverc ; \ - echo "OCTAVE_PACKAGE_PREFIX=[pwd() '/install'];" >> .octaverc ; \ - cd .. + mkdir sandbox; # For now assume that there is only one version of the package for # dependencies. Some version check code should be added!! @@ -89,7 +85,7 @@ if [ ! -d code ]; then mkdir code; fi; \ cd code; tar xzf ../../$(opkg); cd ..; \ pkgs="'../$(opkg)'"; \ - until $(RUN_OCTAVE) --eval "pkg('install',$$pkgs)" 2> baddeps; do \ + until $(RUN_OCTAVE) --eval "pkg('prefix',[pwd(),'/install']);pkg('install',$$pkgs)" 2> baddeps; do \ deps=`cat baddeps | grep " needs " | sed -e 's/^.*needs\s\+\(\S*\).*$$/\1/'`; \ ops=`cat baddeps | grep " needs " | sed -e 's/^.*needs\s\+\S*\s\+\(\S*\).*$$/\1/'`; \ vers=`cat baddeps | grep " needs " | sed -e 's/^.*\s\+\(\S*\)\s*$$/\1/'`; \ diff -r ee8246279730 -r 4ea46b848cf2 www/build-www.py --- a/www/build-www.py Mon Oct 09 23:13:31 2006 +0000 +++ b/www/build-www.py Mon Oct 09 23:15:18 2006 +0000 @@ -3,6 +3,7 @@ import sys import os import shutil +import time ## This function parses a DESCRIPTION file def parse_description(filename): @@ -95,7 +96,7 @@ raise Exception("Can't create tarball"); ## Run octave installation - command = 'global OCTAVE_PACKAGE_PREFIX="' + install_dir + '"; '; + command = 'pkg("prefix","' + install_dir + '"); '; command = command + 'pkg("install", "-nodeps", "' + tarball + '");'; if (os.system("HOME=" + wd + "; octave -H -q --no-site-file --no-init-file --eval '" + command + "' > /dev/null 2>&1") != 0): os.system("ls -la " + install_dir); @@ -108,9 +109,9 @@ local_index.writelines(index.readlines()); local_index.close(); index.close(); - + ## Clean up - command = 'global OCTAVE_PACKAGE_PREFIX="' + install_dir + '"; '; + command = 'pkg("prefix","' + install_dir + '"); '; command = command + 'pkg("uninstall", "-nodeps", "' + desc['name'].lower() + '");'; if (os.system("HOME=" + wd + "; octave -H -q --no-site-file --no-init-file --eval '" + command + "' > /dev/null 2>&1") != 0): os.system("rm -rf " + install_dir + " " + tarball); @@ -139,7 +140,7 @@ fid.write(' Package Author:' + desc["author"] + "\n"); fid.write(' Package Maintainer:' + desc["maintainer"] + "\n"); fid.write(' Download'); - fid.write('Download this package\n'); + fid.write('Download this package\n'); fid.write(' Function Reference'); fid.write('Read package function reference\n'); local = local_documentation(outdir, packdir); @@ -292,7 +293,7 @@ index.write('...'); index.write('

\n'); index.write('\n'); + index.write('download

\n'); index.write('\n'); except Exception, e: print("Skipping " + p);