| Summary: | sci-mathematics/octave-3.8.1 install command fails | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | brho |
| Component: | Current packages | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
*** This bug has been marked as a duplicate of bug 504470 *** |
There is a parse error when running an install command. octave:1> pkg install -forge signal parse error near line 140 of file /usr/share/octave/3.8.1/m/pkg/private/install.m >>> endfor ^ error: 'if' command matched by 'endfor' near line 140 column 5 error: called from: error: /usr/share/octave/3.8.1/m/pkg/pkg.m at line 394, column 9 This problem is caused by an unmatched if/endfor pair around line 65. This problem does not exist in the original octave-3.8.1. Here is a diff from the vanilla 3.8.1 install.m to the Gentoo version. $ diff -u scripts/pkg/private/install.m /usr/share/octave/3.8.1/m/pkg/private/install.m --- scripts/pkg/private/install.m 2014-03-06 11:37:51.000000000 -0800 +++ /usr/share/octave/3.8.1/m/pkg/private/install.m 2014-04-17 18:02:24.205800671 -0700 @@ -63,6 +63,14 @@ tgz = files{i}; if (exist (tgz, "file")) + ## The filename pointed to an uncompressed package to begin with. + if (exist (tgz, "dir")) + if (tgz(1) == '/') + packdir = tgz; + else + packdir = fullfile (pwd(), tgz); + endif + elseif (exist (tgz, "file")) ## Create a temporary directory. tmpdir = tmpnam (); tmpdirs{end+1} = tmpdir; @@ -89,20 +97,12 @@ if (length (dirlist) > 3) error ("bundles of packages are not allowed"); endif - endif - ## The filename pointed to an uncompressed package to begin with. - if (exist (tgz, "dir")) - dirlist = {".", "..", tgz}; + ## The two first entries of dirlist are "." and "..". + packdir = fullfile (tmpdir, dirlist{3}); endif if (exist (tgz, "file") || exist (tgz, "dir")) - ## The two first entries of dirlist are "." and "..". - if (exist (tgz, "file")) - packdir = fullfile (tmpdir, dirlist{3}); - else - packdir = fullfile (pwd (), dirlist{3}); - endif packdirs{end+1} = packdir; ## Make sure the package contains necessary files. The first hunk was the one that added the extra if. Reproducible: Always