[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pkg.m bug?
From: |
Michael Goffioul |
Subject: |
pkg.m bug? |
Date: |
Sat, 26 May 2007 14:49:21 +0200 |
After installing a set of packages, I noticed that, after restarting
octave, only
packages with an arch-dependent directory were autoloaded. The following patch
(see end of mail) solves the problem (although not very elegant).
The problem is in this piece of code:
## Check for architecture dependent directories
arch = getarch();
archdirs = {};
for i = 1:length (dirs)
tmpdir = fullfile (dirs{i}, arch);
archdirs{end + 1} = dirs{i};
if (exist (tmpdir, "dir"))
archdirs{end + 1} = tmpdir;
endif
endfor
if (length (archdirs) > 0)
dirs = archdirs;
endif
When doing the final assignment "dirs = archdirs", packages without
an arch-dependent dir are lost, because they are not included in
archdirs.
Michael.
Index: scripts/pkg/pkg.m
===================================================================
RCS file: /cvs/octave/scripts/pkg/pkg.m,v
retrieving revision 1.46
diff -c -r1.46 pkg.m
*** scripts/pkg/pkg.m 22 May 2007 19:25:29 -0000 1.46
--- scripts/pkg/pkg.m 26 May 2007 12:42:11 -0000
***************
*** 1537,1544 ****
archdirs = {};
for i = 1:length (dirs)
tmpdir = fullfile (dirs{i}, arch);
if (exist (tmpdir, "dir"))
- archdirs{end + 1} = dirs{i};
archdirs{end + 1} = tmpdir;
endif
endfor
--- 1540,1547 ----
archdirs = {};
for i = 1:length (dirs)
tmpdir = fullfile (dirs{i}, arch);
+ archdirs{end + 1} = dirs{i};
if (exist (tmpdir, "dir"))
archdirs{end + 1} = tmpdir;
endif
endfor
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- pkg.m bug?,
Michael Goffioul <=