aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPaul Eggert2011-11-19 19:07:02 -0800
committerPaul Eggert2011-11-19 19:07:02 -0800
commit615a3b8d0d2c88cd664f1e0beb5a32b5b8e08f90 (patch)
treee0458a9eac443c36a3a4bfa117fde01bbd6e4140 /test
parentc3ca24d48c10fb771ee02eb58f7d49bd82d6306e (diff)
parente1dbe924b53c541fdf238a5a722b7177d5c8760b (diff)
downloademacs-615a3b8d0d2c88cd664f1e0beb5a32b5b8e08f90.tar.gz
emacs-615a3b8d0d2c88cd664f1e0beb5a32b5b8e08f90.zip
Merge from trunk.
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog6
-rw-r--r--test/automated/ert-tests.el8
-rw-r--r--test/automated/icalendar-tests.el16
-rw-r--r--test/cedet/semantic-tests.el3
-rw-r--r--test/cedet/semantic-utest.el6
-rw-r--r--test/cedet/srecode-tests.el2
-rw-r--r--test/cedet/tests/testpolymorph.cpp3
-rw-r--r--test/cedet/tests/testsppreplaced.c5
-rw-r--r--test/indent/octave.m166
9 files changed, 109 insertions, 106 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index de4fb270440..9afed6f5f90 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
12011-11-16 Juanma Barranquero <lekktu@gmail.com>
2
3 * automated/icalendar-tests.el (icalendar-tests--get-ical-event)
4 (icalendar-tests--test-export, icalendar-tests--do-test-export):
5 * cedet/srecode-tests.el (srecode-field-utest-impl): Fix typo.
6
12011-10-30 Ulf Jasper <ulf.jasper@web.de> 72011-10-30 Ulf Jasper <ulf.jasper@web.de>
2 8
3 * automated/newsticker-tests.el 9 * automated/newsticker-tests.el
diff --git a/test/automated/ert-tests.el b/test/automated/ert-tests.el
index cea994f64b8..1fe6352e1fe 100644
--- a/test/automated/ert-tests.el
+++ b/test/automated/ert-tests.el
@@ -228,7 +228,7 @@ failed or if there was a problem."
228 :form (error "Foo") 228 :form (error "Foo")
229 :condition (error "Foo") 229 :condition (error "Foo")
230 :fail-reason 230 :fail-reason
231 "the error signalled did not have the expected type")))))) 231 "the error signaled did not have the expected type"))))))
232 ;; Error of the expected type. 232 ;; Error of the expected type.
233 (let* ((error nil) 233 (let* ((error nil)
234 (test (make-ert-test 234 (test (make-ert-test
@@ -258,7 +258,7 @@ failed or if there was a problem."
258 :form (signal arith-error nil) 258 :form (signal arith-error nil)
259 :condition (arith-error) 259 :condition (arith-error)
260 :fail-reason 260 :fail-reason
261 "the error signalled did not have the expected type")))))) 261 "the error signaled did not have the expected type"))))))
262 (let ((test (make-ert-test 262 (let ((test (make-ert-test
263 :body (lambda () 263 :body (lambda ()
264 (should-error (signal 'arith-error nil) 264 (should-error (signal 'arith-error nil)
@@ -275,7 +275,7 @@ failed or if there was a problem."
275 :form (signal arith-error nil) 275 :form (signal arith-error nil)
276 :condition (arith-error) 276 :condition (arith-error)
277 :fail-reason 277 :fail-reason
278 "the error signalled did not have the expected type")))))) 278 "the error signaled did not have the expected type"))))))
279 (let ((test (make-ert-test 279 (let ((test (make-ert-test
280 :body (lambda () 280 :body (lambda ()
281 (should-error (signal 'singularity-error nil) 281 (should-error (signal 'singularity-error nil)
@@ -292,7 +292,7 @@ failed or if there was a problem."
292 :form (signal singularity-error nil) 292 :form (signal singularity-error nil)
293 :condition (singularity-error) 293 :condition (singularity-error)
294 :fail-reason 294 :fail-reason
295 "the error signalled was a subtype of the expected type"))))) 295 "the error signaled was a subtype of the expected type")))))
296 )) 296 ))
297 297
298(defmacro ert--test-my-list (&rest args) 298(defmacro ert--test-my-list (&rest args)
diff --git a/test/automated/icalendar-tests.el b/test/automated/icalendar-tests.el
index 04fce7383fd..6ed1d73767a 100644
--- a/test/automated/icalendar-tests.el
+++ b/test/automated/icalendar-tests.el
@@ -39,7 +39,7 @@
39;; ====================================================================== 39;; ======================================================================
40 40
41(defun icalendar-tests--get-ical-event (ical-string) 41(defun icalendar-tests--get-ical-event (ical-string)
42 "Return icalendar event for ICAL-STRING." 42 "Return iCalendar event for ICAL-STRING."
43 (save-excursion 43 (save-excursion
44 (with-temp-buffer 44 (with-temp-buffer
45 (insert ical-string) 45 (insert ical-string)
@@ -219,7 +219,7 @@ END:VTIMEZONE
219 (should (string= "\nDTSTART;VALUE=DATE:20100215\nDTEND;VALUE=DATE:20100216" 219 (should (string= "\nDTSTART;VALUE=DATE:20100215\nDTEND;VALUE=DATE:20100216"
220 (car result))) 220 (car result)))
221 (should (string= "subject" (cadr result))) 221 (should (string= "subject" (cadr result)))
222 222
223 ;; with time 223 ;; with time
224 (setq result (icalendar--convert-ordinary-to-ical 224 (setq result (icalendar--convert-ordinary-to-ical
225 "&?" "&2010 2 15 12:34-23:45 s")) 225 "&?" "&2010 2 15 12:34-23:45 s"))
@@ -424,7 +424,7 @@ END:VEVENT
424Argument INPUT-ISO iso style diary string. 424Argument INPUT-ISO iso style diary string.
425Argument INPUT-EUROPEAN european style diary string. 425Argument INPUT-EUROPEAN european style diary string.
426Argument INPUT-AMERICAN american style diary string. 426Argument INPUT-AMERICAN american style diary string.
427Argument EXPECTED-OUTPUT expected icalendar result string. 427Argument EXPECTED-OUTPUT expected iCalendar result string.
428 428
429European style input data must use german month names. American 429European style input data must use german month names. American
430and ISO style input data must use english month names." 430and ISO style input data must use english month names."
@@ -467,7 +467,7 @@ and ISO style input data must use english month names."
467(defun icalendar-tests--do-test-export (input expected-output) 467(defun icalendar-tests--do-test-export (input expected-output)
468 "Actually perform export test. 468 "Actually perform export test.
469Argument INPUT input diary string. 469Argument INPUT input diary string.
470Argument EXPECTED-OUTPUT expected icalendar result string." 470Argument EXPECTED-OUTPUT expected iCalendar result string."
471 (let ((temp-file (make-temp-file "icalendar-tests-ics"))) 471 (let ((temp-file (make-temp-file "icalendar-tests-ics")))
472 (unwind-protect 472 (unwind-protect
473 (progn 473 (progn
@@ -732,7 +732,7 @@ DTSTART;VALUE=DATE-TIME:20030919"
732 "&9/19/2003 non-recurring allday\n") 732 "&9/19/2003 non-recurring allday\n")
733 (icalendar-tests--test-import 733 (icalendar-tests--test-import
734 ;; do not remove the trailing blank after "long"! 734 ;; do not remove the trailing blank after "long"!
735 "SUMMARY:long 735 "SUMMARY:long
736 summary 736 summary
737DTSTART;VALUE=DATE:20030919" 737DTSTART;VALUE=DATE:20030919"
738 "&2003/9/19 long summary\n" 738 "&2003/9/19 long summary\n"
@@ -1041,7 +1041,7 @@ SUMMARY:event-1
1041 "&2011/7/23 event-1\n" 1041 "&2011/7/23 event-1\n"
1042 "&23/7/2011 event-1\n" 1042 "&23/7/2011 event-1\n"
1043 "&7/23/2011 event-1\n") 1043 "&7/23/2011 event-1\n")
1044 1044
1045 (icalendar-tests--test-import 1045 (icalendar-tests--test-import
1046 "BEGIN:VCALENDAR 1046 "BEGIN:VCALENDAR
1047PRODID:-//Emacs//NONSGML icalendar.el//EN 1047PRODID:-//Emacs//NONSGML icalendar.el//EN
@@ -1111,7 +1111,7 @@ Argument INPUT icalendar event string."
1111 (progn 1111 (progn
1112 ;; step 1: import 1112 ;; step 1: import
1113 (icalendar-import-buffer temp-diary t t) 1113 (icalendar-import-buffer temp-diary t t)
1114 1114
1115 ;; step 2: export what was just imported 1115 ;; step 2: export what was just imported
1116 (save-excursion 1116 (save-excursion
1117 (find-file temp-diary) 1117 (find-file temp-diary)
@@ -1399,7 +1399,7 @@ SUMMARY:may 30 - June 1: ee")
1399 "DTSTART;VALUE=DATE:20050606 1399 "DTSTART;VALUE=DATE:20050606
1400DTEND;VALUE=DATE:20050609 1400DTEND;VALUE=DATE:20050609
1401SUMMARY:ff") 1401SUMMARY:ff")
1402 1402
1403 ;; export 2004-10-28 anniversary entries 1403 ;; export 2004-10-28 anniversary entries
1404 (icalendar-tests--test-export 1404 (icalendar-tests--test-export
1405 nil 1405 nil
diff --git a/test/cedet/semantic-tests.el b/test/cedet/semantic-tests.el
index c840993bf24..16dcd42c2ae 100644
--- a/test/cedet/semantic-tests.el
+++ b/test/cedet/semantic-tests.el
@@ -54,7 +54,7 @@ All systems are different. Ask questions along the way."
54 (y-or-n-p "New database created. Reload system databases? ") 54 (y-or-n-p "New database created. Reload system databases? ")
55 (y-or-n-p "Load in all system databases? ")) 55 (y-or-n-p "Load in all system databases? "))
56 (semanticdb-load-ebrowse-caches))) 56 (semanticdb-load-ebrowse-caches)))
57 ;; Ok, databases were creatd. Lets try some searching. 57 ;; Ok, databases were created. Let's try some searching.
58 (when (not (or (eq major-mode 'c-mode) 58 (when (not (or (eq major-mode 'c-mode)
59 (eq major-mode 'c++-mode))) 59 (eq major-mode 'c++-mode)))
60 (error "Please make your default buffer be a C or C++ file, then 60 (error "Please make your default buffer be a C or C++ file, then
@@ -387,4 +387,3 @@ gcc version 2.95.2 19991024 (release)"
387 (let ((semantic-gcc-test-strings (list (semantic-gcc-query "gcc" "-v")))) 387 (let ((semantic-gcc-test-strings (list (semantic-gcc-query "gcc" "-v"))))
388 (semantic-gcc-test-output-parser)) 388 (semantic-gcc-test-output-parser))
389 ) 389 )
390
diff --git a/test/cedet/semantic-utest.el b/test/cedet/semantic-utest.el
index a9a7c765f2b..b50f75df996 100644
--- a/test/cedet/semantic-utest.el
+++ b/test/cedet/semantic-utest.el
@@ -170,7 +170,7 @@ def fun2(a,b,c): #1
170 170
171 171
172) 172)
173; "pyhon test case. notice that python is indentation sensitive 173; "python test case. notice that python is indentation sensitive
174 174
175 175
176(defvar semantic-utest-Python-name-contents 176(defvar semantic-utest-Python-name-contents
@@ -787,7 +787,7 @@ SKIPNAMES is a list of names to remove from NAME-CONTENTS"
787(defun semantic-utest-kill-indicator ( killme insertme) 787(defun semantic-utest-kill-indicator ( killme insertme)
788 "Kill the line with KILLME on it and insert INSERTME in its place." 788 "Kill the line with KILLME on it and insert INSERTME in its place."
789 (goto-char (point-min)) 789 (goto-char (point-min))
790; (re-search-forward (concat "/\\*" indicator "\\*/")); JAVE this isnt generic enough for different lagnuages 790; (re-search-forward (concat "/\\*" indicator "\\*/")); JAVE this isn't generic enough for different languages
791 (re-search-forward killme) 791 (re-search-forward killme)
792 (beginning-of-line) 792 (beginning-of-line)
793 (setq semantic-utest-last-kill-pos (point)) 793 (setq semantic-utest-last-kill-pos (point))
@@ -812,7 +812,7 @@ SKIPNAMES is a list of names to remove from NAME-CONTENTS"
812(defun semantic-utest-last-invalid (name-contents names-removed killme insertme) 812(defun semantic-utest-last-invalid (name-contents names-removed killme insertme)
813 "Make the last fcn invalid." 813 "Make the last fcn invalid."
814 (semantic-utest-kill-indicator killme insertme) 814 (semantic-utest-kill-indicator killme insertme)
815; (semantic-utest-verify-names name-contents names-removed); verify its gone ;new validator doesnt handle skipnames yet 815; (semantic-utest-verify-names name-contents names-removed); verify its gone ;new validator doesn't handle skipnames yet
816 (semantic-utest-unkill-indicator);put back killed stuff 816 (semantic-utest-unkill-indicator);put back killed stuff
817 ) 817 )
818 818
diff --git a/test/cedet/srecode-tests.el b/test/cedet/srecode-tests.el
index 10b06f5cd01..a1b8f60b2ec 100644
--- a/test/cedet/srecode-tests.el
+++ b/test/cedet/srecode-tests.el
@@ -177,7 +177,7 @@ It is filled with some text."
177 177
178 (mapc (lambda (T) 178 (mapc (lambda (T)
179 (when (slot-boundp T 'overlay) 179 (when (slot-boundp T 'overlay)
180 (error "Overlay did not clear off of of field %s" 180 (error "Overlay did not clear off of field %s"
181 (object-name T)))) 181 (object-name T))))
182 fields) 182 fields)
183 183
diff --git a/test/cedet/tests/testpolymorph.cpp b/test/cedet/tests/testpolymorph.cpp
index 493b4344c17..9db2d51efe7 100644
--- a/test/cedet/tests/testpolymorph.cpp
+++ b/test/cedet/tests/testpolymorph.cpp
@@ -50,7 +50,7 @@ namespace fcn_poly {
50 50
51} 51}
52 52
53// Test 3 - Methods w/ differet arg lists. 53// Test 3 - Methods w/ different arg lists.
54class meth_poly { 54class meth_poly {
55public: 55public:
56 int pm_meth(void) { 56 int pm_meth(void) {
@@ -128,4 +128,3 @@ namespace template_multiple_spec {
128 128
129 129
130// End of polymorphism test file. 130// End of polymorphism test file.
131
diff --git a/test/cedet/tests/testsppreplaced.c b/test/cedet/tests/testsppreplaced.c
index 5098715081f..58d1ac2b684 100644
--- a/test/cedet/tests/testsppreplaced.c
+++ b/test/cedet/tests/testsppreplaced.c
@@ -69,7 +69,7 @@ int continuation_symbol () { };
69 69
70int tail (int q) {} 70int tail (int q) {}
71 71
72/* TEST: macros used impropertly. */ 72/* TEST: macros used improperly */
73 73
74int tail_fcn(int q); 74int tail_fcn(int q);
75 75
@@ -98,7 +98,7 @@ namespace foo { namespace bar {
98 98
99 int foo_bar_func(int a) { } 99 int foo_bar_func(int a) { }
100 100
101 } 101 }
102} 102}
103 103
104/* TEST: The VC++ macro hack. */ 104/* TEST: The VC++ macro hack. */
@@ -115,4 +115,3 @@ int MACROA () {
115 115
116 116
117/* End */ 117/* End */
118
diff --git a/test/indent/octave.m b/test/indent/octave.m
index 768f3d85e01..5ce52ad7a19 100644
--- a/test/indent/octave.m
+++ b/test/indent/octave.m
@@ -3,7 +3,7 @@
3function res = tcomp (fn) 3function res = tcomp (fn)
4 %% res = tcomp (fn) 4 %% res = tcomp (fn)
5 %% imports components and rearranges them. 5 %% imports components and rearranges them.
6 6
7 if nargin ~= 1 7 if nargin ~= 1
8 print_usage() 8 print_usage()
9 end 9 end
@@ -36,7 +36,7 @@ function res = tcomp (fn)
36endfunction 36endfunction
37 37
38## Copyright (C) 2005, 2006, 2007, 2008, 2009 S�ren Hauberg 38## Copyright (C) 2005, 2006, 2007, 2008, 2009 S�ren Hauberg
39## 39##
40## This file is part of Octave. 40## This file is part of Octave.
41## 41##
42## Octave is free software; you can redistribute it and/or modify it 42## Octave is free software; you can redistribute it and/or modify it
@@ -73,16 +73,16 @@ endfunction
73## 73##
74## @table @code 74## @table @code
75## @item -nodeps 75## @item -nodeps
76## The package manager will disable the dependency checking. That way it 76## The package manager will disable the dependency checking. That way it
77## is possible to install a package even if it depends on another package 77## is possible to install a package even if it depends on another package
78## that's not installed on the system. @strong{Use this option with care.} 78## that's not installed on the system. @strong{Use this option with care.}
79## 79##
80## @item -noauto 80## @item -noauto
81## The package manager will not automatically load the installed package 81## The package manager will not automatically load the installed package
82## when starting Octave, even if the package requests that it is. 82## when starting Octave, even if the package requests that it is.
83## 83##
84## @item -auto 84## @item -auto
85## The package manager will automatically load the installed package when 85## The package manager will automatically load the installed package when
86## starting Octave, even if the package requests that it isn't. 86## starting Octave, even if the package requests that it isn't.
87## 87##
88## @item -local 88## @item -local
@@ -93,7 +93,7 @@ endfunction
93## system privileges 93## system privileges
94## 94##
95## @item -verbose 95## @item -verbose
96## The package manager will print the output of all of the commands that are 96## The package manager will print the output of all of the commands that are
97## performed. 97## performed.
98## @end table 98## @end table
99## 99##
@@ -205,7 +205,7 @@ endfunction
205## pkg global_list 205## pkg global_list
206## @end example 206## @end example
207## @item rebuild 207## @item rebuild
208## Rebuilds the package database from the installed directories. This can 208## Rebuilds the package database from the installed directories. This can
209## be used in cases where for some reason the package database is corrupted. 209## be used in cases where for some reason the package database is corrupted.
210## It can also take the @code{-auto} and @code{-noauto} options to allow the 210## It can also take the @code{-auto} and @code{-noauto} options to allow the
211## autoloading state of a package to be changed. For example 211## autoloading state of a package to be changed. For example
@@ -227,7 +227,7 @@ endfunction
227## @noindent 227## @noindent
228## where @code{builddir} is the name of a directory where the temporary 228## where @code{builddir} is the name of a directory where the temporary
229## installation will be produced and the binary packages will be found. 229## installation will be produced and the binary packages will be found.
230## The options @code{-verbose} and @code{-nodeps} are respected, while 230## The options @code{-verbose} and @code{-nodeps} are respected, while
231## the other options are ignored. 231## the other options are ignored.
232## @end table 232## @end table
233## @end deftypefn 233## @end deftypefn
@@ -259,7 +259,7 @@ function [local_packages, global_packages] = pkg (varargin)
259 259
260 available_actions = {"list", "install", "uninstall", "load", ... 260 available_actions = {"list", "install", "uninstall", "load", ...
261 "unload", "prefix", "local_list", ... 261 "unload", "prefix", "local_list", ...
262 "global_list", "rebuild", "build","describe"}; 262 "global_list", "rebuild", "build","describe"};
263 ## Handle input 263 ## Handle input
264 if (length (varargin) == 0 || ! iscellstr (varargin)) 264 if (length (varargin) == 0 || ! iscellstr (varargin))
265 print_usage (); 265 print_usage ();
@@ -321,14 +321,14 @@ function [local_packages, global_packages] = pkg (varargin)
321 if (length (files) == 0) 321 if (length (files) == 0)
322 error ("you must specify at least one filename when calling 'pkg install'"); 322 error ("you must specify at least one filename when calling 'pkg install'");
323 endif 323 endif
324 install (files, deps, auto, prefix, archprefix, verbose, local_list, 324 install (files, deps, auto, prefix, archprefix, verbose, local_list,
325 global_list, global_install); 325 global_list, global_install);
326 326
327 case "uninstall" 327 case "uninstall"
328 if (length (files) == 0) 328 if (length (files) == 0)
329 error ("you must specify at least one package when calling 'pkg uninstall'"); 329 error ("you must specify at least one package when calling 'pkg uninstall'");
330 endif 330 endif
331 uninstall (files, deps, verbose, local_list, 331 uninstall (files, deps, verbose, local_list,
332 global_list, global_install); 332 global_list, global_install);
333 333
334 case "load" 334 case "load"
@@ -406,7 +406,7 @@ function [local_packages, global_packages] = pkg (varargin)
406 406
407 case "rebuild" 407 case "rebuild"
408 if (global_install) 408 if (global_install)
409 global_packages = rebuild (prefix, archprefix, global_list, files, 409 global_packages = rebuild (prefix, archprefix, global_list, files,
410 auto, verbose); 410 auto, verbose);
411 global_packages = save_order (global_packages); 411 global_packages = save_order (global_packages);
412 save (global_list, "global_packages"); 412 save (global_list, "global_packages");
@@ -414,7 +414,7 @@ function [local_packages, global_packages] = pkg (varargin)
414 local_packages = global_packages; 414 local_packages = global_packages;
415 endif 415 endif
416 else 416 else
417 local_packages = rebuild (prefix, archprefix, local_list, files, auto, 417 local_packages = rebuild (prefix, archprefix, local_list, files, auto,
418 verbose); 418 verbose);
419 local_packages = save_order (local_packages); 419 local_packages = save_order (local_packages);
420 save (local_list, "local_packages"); 420 save (local_list, "local_packages");
@@ -450,7 +450,7 @@ function [local_packages, global_packages] = pkg (varargin)
450 otherwise 450 otherwise
451 error ("you can request at most two outputs when calling 'pkg describe'"); 451 error ("you can request at most two outputs when calling 'pkg describe'");
452 endswitch 452 endswitch
453 453
454 otherwise 454 otherwise
455 error ("you must specify a valid action for 'pkg'. See 'help pkg' for details"); 455 error ("you must specify a valid action for 'pkg'. See 'help pkg' for details");
456 endswitch 456 endswitch
@@ -529,7 +529,7 @@ function descriptions = rebuild (prefix, archprefix, list, files, auto, verbose)
529 endfor 529 endfor
530 if (! isempty (dup)) 530 if (! isempty (dup))
531 descriptions (dup) = []; 531 descriptions (dup) = [];
532 endif 532 endif
533 endif 533 endif
534endfunction 534endfunction
535 535
@@ -555,7 +555,7 @@ function build (files, handle_deps, autoload, verbose)
555 endif 555 endif
556 files(1) = []; 556 files(1) = [];
557 buildlist = fullfile (builddir, "octave_packages"); 557 buildlist = fullfile (builddir, "octave_packages");
558 install (files, handle_deps, autoload, installdir, installdir, verbose, 558 install (files, handle_deps, autoload, installdir, installdir, verbose,
559 buildlist, "", false); 559 buildlist, "", false);
560 unwind_protect 560 unwind_protect
561 repackage (builddir, buildlist); 561 repackage (builddir, buildlist);
@@ -570,7 +570,7 @@ function build (files, handle_deps, autoload, verbose)
570 end_unwind_protect 570 end_unwind_protect
571endfunction 571endfunction
572 572
573function install (files, handle_deps, autoload, prefix, archprefix, verbose, 573function install (files, handle_deps, autoload, prefix, archprefix, verbose,
574 local_list, global_list, global_install) 574 local_list, global_list, global_install)
575 575
576 ## Check that the directory in prefix exist. If it doesn't: create it! 576 ## Check that the directory in prefix exist. If it doesn't: create it!
@@ -583,10 +583,10 @@ function install (files, handle_deps, autoload, prefix, archprefix, verbose,
583 endif 583 endif
584 584
585 ## Get the list of installed packages. 585 ## Get the list of installed packages.
586 [local_packages, global_packages] = installed_packages (local_list, 586 [local_packages, global_packages] = installed_packages (local_list,
587 global_list); 587 global_list);
588 588
589 installed_pkgs_lst = {local_packages{:}, global_packages{:}}; 589 installed_pkgs_lst = {local_packages{:}, global_packages{:}};
590 590
591 if (global_install) 591 if (global_install)
592 packages = global_packages; 592 packages = global_packages;
@@ -599,7 +599,7 @@ function install (files, handle_deps, autoload, prefix, archprefix, verbose,
599 try 599 try
600 ## Warn about non existent files. 600 ## Warn about non existent files.
601 for i = 1:length (files) 601 for i = 1:length (files)
602 if (isempty (glob(files{i}))) 602 if (isempty (glob(files{i})))
603 warning ("file %s does not exist", files{i}); 603 warning ("file %s does not exist", files{i});
604 endif 604 endif
605 endfor 605 endfor
@@ -652,32 +652,32 @@ function install (files, handle_deps, autoload, prefix, archprefix, verbose,
652 packdir = fullfile (pwd(), dirlist{3}); 652 packdir = fullfile (pwd(), dirlist{3});
653 endif 653 endif
654 packdirs{end+1} = packdir; 654 packdirs{end+1} = packdir;
655 655
656 ## Make sure the package contains necessary files. 656 ## Make sure the package contains necessary files.
657 verify_directory (packdir); 657 verify_directory (packdir);
658 658
659 ## Read the DESCRIPTION file. 659 ## Read the DESCRIPTION file.
660 filename = fullfile (packdir, "DESCRIPTION"); 660 filename = fullfile (packdir, "DESCRIPTION");
661 desc = get_description (filename); 661 desc = get_description (filename);
662 662
663 ## Verify that package name corresponds with filename. 663 ## Verify that package name corresponds with filename.
664 [dummy, nm] = fileparts (tgz); 664 [dummy, nm] = fileparts (tgz);
665 if ((length (nm) >= length (desc.name)) 665 if ((length (nm) >= length (desc.name))
666 && ! strcmp (desc.name, nm(1:length(desc.name)))) 666 && ! strcmp (desc.name, nm(1:length(desc.name))))
667 error ("package name '%s' doesn't correspond to its filename '%s'", 667 error ("package name '%s' doesn't correspond to its filename '%s'",
668 desc.name, nm); 668 desc.name, nm);
669 endif 669 endif
670 670
671 ## Set default installation directory. 671 ## Set default installation directory.
672 desc.dir = fullfile (prefix, cstrcat (desc.name, "-", desc.version)); 672 desc.dir = fullfile (prefix, cstrcat (desc.name, "-", desc.version));
673 673
674 ## Set default architectire dependent installation directory. 674 ## Set default architecture dependent installation directory.
675 desc.archprefix = fullfile (archprefix, cstrcat (desc.name, "-", 675 desc.archprefix = fullfile (archprefix, cstrcat (desc.name, "-",
676 desc.version)); 676 desc.version));
677 677
678 ## Save desc. 678 ## Save desc.
679 descriptions{end+1} = desc; 679 descriptions{end+1} = desc;
680 680
681 ## Are any of the new packages already installed? 681 ## Are any of the new packages already installed?
682 ## If so we'll remove the old version. 682 ## If so we'll remove the old version.
683 for j = 1:length (packages) 683 for j = 1:length (packages)
@@ -705,14 +705,14 @@ function install (files, handle_deps, autoload, prefix, archprefix, verbose,
705 if (global_install) 705 if (global_install)
706 ## Global installation is not allowed to have dependencies on locally 706 ## Global installation is not allowed to have dependencies on locally
707 ## installed packages. 707 ## installed packages.
708 idx1 = complement (packages_to_uninstall, 708 idx1 = complement (packages_to_uninstall,
709 1:length(global_packages)); 709 1:length(global_packages));
710 pseudo_installed_packages = {global_packages{idx1}, ... 710 pseudo_installed_packages = {global_packages{idx1}, ...
711 descriptions{idx2}}; 711 descriptions{idx2}};
712 else 712 else
713 idx1 = complement (packages_to_uninstall, 713 idx1 = complement (packages_to_uninstall,
714 1:length(local_packages)); 714 1:length(local_packages));
715 pseudo_installed_packages = {local_packages{idx1}, ... 715 pseudo_installed_packages = {local_packages{idx1}, ...
716 global_packages{:}, ... 716 global_packages{:}, ...
717 descriptions{idx2}}; 717 descriptions{idx2}};
718 endif 718 endif
@@ -755,10 +755,10 @@ function install (files, handle_deps, autoload, prefix, archprefix, verbose,
755 try 755 try
756 for i = packages_to_uninstall 756 for i = packages_to_uninstall
757 if (global_install) 757 if (global_install)
758 uninstall ({global_packages{i}.name}, false, verbose, local_list, 758 uninstall ({global_packages{i}.name}, false, verbose, local_list,
759 global_list, global_install); 759 global_list, global_install);
760 else 760 else
761 uninstall ({local_packages{i}.name}, false, verbose, local_list, 761 uninstall ({local_packages{i}.name}, false, verbose, local_list,
762 global_list, global_install); 762 global_list, global_install);
763 endif 763 endif
764 endfor 764 endfor
@@ -809,7 +809,7 @@ function install (files, handle_deps, autoload, prefix, archprefix, verbose,
809 ## requested that it is, then mark the package as autoloaded. 809 ## requested that it is, then mark the package as autoloaded.
810 for i = length (descriptions):-1:1 810 for i = length (descriptions):-1:1
811 if (autoload > 0 || (autoload == 0 && isautoload (descriptions(i)))) 811 if (autoload > 0 || (autoload == 0 && isautoload (descriptions(i))))
812 fclose (fopen (fullfile (descriptions{i}.dir, "packinfo", 812 fclose (fopen (fullfile (descriptions{i}.dir, "packinfo",
813 ".autoload"), "wt")); 813 ".autoload"), "wt"));
814 descriptions{i}.autoload = 1; 814 descriptions{i}.autoload = 1;
815 endif 815 endif
@@ -872,10 +872,10 @@ function install (files, handle_deps, autoload, prefix, archprefix, verbose,
872 endif 872 endif
873endfunction 873endfunction
874 874
875function uninstall (pkgnames, handle_deps, verbose, local_list, 875function uninstall (pkgnames, handle_deps, verbose, local_list,
876 global_list, global_install) 876 global_list, global_install)
877 ## Get the list of installed packages. 877 ## Get the list of installed packages.
878 [local_packages, global_packages] = installed_packages(local_list, 878 [local_packages, global_packages] = installed_packages(local_list,
879 global_list); 879 global_list);
880 if (global_install) 880 if (global_install)
881 installed_pkgs_lst = {local_packages{:}, global_packages{:}}; 881 installed_pkgs_lst = {local_packages{:}, global_packages{:}};
@@ -996,13 +996,13 @@ function uninstall (pkgnames, handle_deps, verbose, local_list,
996 996
997endfunction 997endfunction
998 998
999function [pkg_desc_list, flag] = describe (pkgnames, verbose, 999function [pkg_desc_list, flag] = describe (pkgnames, verbose,
1000 local_list, global_list) 1000 local_list, global_list)
1001 1001
1002 ## Get the list of installed packages. 1002 ## Get the list of installed packages.
1003 installed_pkgs_lst = installed_packages(local_list, global_list); 1003 installed_pkgs_lst = installed_packages(local_list, global_list);
1004 num_packages = length (installed_pkgs_lst); 1004 num_packages = length (installed_pkgs_lst);
1005 1005
1006 1006
1007 describe_all = false; 1007 describe_all = false;
1008 if (any (strcmp ("all", pkgnames))) 1008 if (any (strcmp ("all", pkgnames)))
@@ -1043,7 +1043,7 @@ function [pkg_desc_list, flag] = describe (pkgnames, verbose,
1043 non_inst_str = sprintf (" %s ", pkgnames{non_inst}); 1043 non_inst_str = sprintf (" %s ", pkgnames{non_inst});
1044 error ("some packages are not installed: %s", non_inst_str); 1044 error ("some packages are not installed: %s", non_inst_str);
1045 else 1045 else
1046 pkg_desc_list{non_inst} = struct ("name", {}, "description", 1046 pkg_desc_list{non_inst} = struct ("name", {}, "description",
1047 {}, "provides", {}); 1047 {}, "provides", {});
1048 endif 1048 endif
1049 endif 1049 endif
@@ -1052,7 +1052,7 @@ function [pkg_desc_list, flag] = describe (pkgnames, verbose,
1052 for i = 1:num_pkgnames 1052 for i = 1:num_pkgnames
1053 print_package_description (pkg_desc_list{i}.name, 1053 print_package_description (pkg_desc_list{i}.name,
1054 pkg_desc_list{i}.version, 1054 pkg_desc_list{i}.version,
1055 pkg_desc_list{i}.provides, 1055 pkg_desc_list{i}.provides,
1056 pkg_desc_list{i}.description, 1056 pkg_desc_list{i}.description,
1057 flag{i}, verbose); 1057 flag{i}, verbose);
1058 endfor 1058 endfor
@@ -1069,12 +1069,12 @@ function [pkg_idx_struct] = parse_pkg_idx (packdir)
1069 1069
1070 if (! exist (index_file, "file")) 1070 if (! exist (index_file, "file"))
1071 error ("could not find any INDEX file in directory %s, try 'pkg rebuild all' to generate missing INDEX files", packdir); 1071 error ("could not find any INDEX file in directory %s, try 'pkg rebuild all' to generate missing INDEX files", packdir);
1072 endif 1072 endif
1073
1073 1074
1074
1075 [fid, msg] = fopen (index_file, "r"); 1075 [fid, msg] = fopen (index_file, "r");
1076 if (fid == -1) 1076 if (fid == -1)
1077 error ("the INDEX file %s could not be read: %s", 1077 error ("the INDEX file %s could not be read: %s",
1078 index_file, msg); 1078 index_file, msg);
1079 endif 1079 endif
1080 1080
@@ -1089,7 +1089,7 @@ function [pkg_idx_struct] = parse_pkg_idx (packdir)
1089 1089
1090 while (! feof (fid) || line != -1) 1090 while (! feof (fid) || line != -1)
1091 if (! any (! isspace (line)) || line(1) == "#" || any (line == "=")) 1091 if (! any (! isspace (line)) || line(1) == "#" || any (line == "="))
1092 ## Comments, blank lines or comments about unimplemented 1092 ## Comments, blank lines or comments about unimplemented
1093 ## functions: do nothing 1093 ## functions: do nothing
1094 ## FIXME: probably comments and pointers to external functions 1094 ## FIXME: probably comments and pointers to external functions
1095 ## could be treated better when printing to screen? 1095 ## could be treated better when printing to screen?
@@ -1114,7 +1114,7 @@ function [pkg_idx_struct] = parse_pkg_idx (packdir)
1114 fclose (fid); 1114 fclose (fid);
1115endfunction 1115endfunction
1116 1116
1117function print_package_description (pkg_name, pkg_ver, pkg_idx_struct, 1117function print_package_description (pkg_name, pkg_ver, pkg_idx_struct,
1118 pkg_desc, status, verbose) 1118 pkg_desc, status, verbose)
1119 1119
1120 printf ("---\nPackage name:\n\t%s\n", pkg_name); 1120 printf ("---\nPackage name:\n\t%s\n", pkg_name);
@@ -1122,7 +1122,7 @@ function print_package_description (pkg_name, pkg_ver, pkg_idx_struct,
1122 printf ("Short description:\n\t%s\n", pkg_desc); 1122 printf ("Short description:\n\t%s\n", pkg_desc);
1123 printf ("Status:\n\t%s\n", status); 1123 printf ("Status:\n\t%s\n", status);
1124 if (verbose) 1124 if (verbose)
1125 printf ("---\nProvides:\n"); 1125 printf ("---\nProvides:\n");
1126 for i = 1:length(pkg_idx_struct) 1126 for i = 1:length(pkg_idx_struct)
1127 if (! isempty (pkg_idx_struct{i}.functions)) 1127 if (! isempty (pkg_idx_struct{i}.functions))
1128 printf ("%s\n", pkg_idx_struct{i}.category); 1128 printf ("%s\n", pkg_idx_struct{i}.category);
@@ -1177,26 +1177,26 @@ function repackage (builddir, buildlist)
1177 unlink (fullfile (pack.name, "inst", "PKG_DEL")); 1177 unlink (fullfile (pack.name, "inst", "PKG_DEL"));
1178 endif 1178 endif
1179 if (exist (fullfile (archdir, "PKG_ADD"), "file")) 1179 if (exist (fullfile (archdir, "PKG_ADD"), "file"))
1180 movefile (fullfile (archdir, "PKG_ADD"), 1180 movefile (fullfile (archdir, "PKG_ADD"),
1181 fullfile (pack.name, "PKG_ADD")); 1181 fullfile (pack.name, "PKG_ADD"));
1182 endif 1182 endif
1183 if (exist (fullfile (archdir, "PKG_DEL"), "file")) 1183 if (exist (fullfile (archdir, "PKG_DEL"), "file"))
1184 movefile (fullfile (archdir, "PKG_DEL"), 1184 movefile (fullfile (archdir, "PKG_DEL"),
1185 fullfile (pack.name, "PKG_DEL")); 1185 fullfile (pack.name, "PKG_DEL"));
1186 endif 1186 endif
1187 else 1187 else
1188 if (exist (fullfile (pack.name, "inst", "PKG_ADD"), "file")) 1188 if (exist (fullfile (pack.name, "inst", "PKG_ADD"), "file"))
1189 movefile (fullfile (pack.name, "inst", "PKG_ADD"), 1189 movefile (fullfile (pack.name, "inst", "PKG_ADD"),
1190 fullfile (pack.name, "PKG_ADD")); 1190 fullfile (pack.name, "PKG_ADD"));
1191 endif 1191 endif
1192 if (exist (fullfile (pack.name, "inst", "PKG_DEL"), "file")) 1192 if (exist (fullfile (pack.name, "inst", "PKG_DEL"), "file"))
1193 movefile (fullfile (pack.name, "inst", "PKG_DEL"), 1193 movefile (fullfile (pack.name, "inst", "PKG_DEL"),
1194 fullfile (pack.name, "PKG_DEL")); 1194 fullfile (pack.name, "PKG_DEL"));
1195 endif 1195 endif
1196 endif 1196 endif
1197 tfile = cstrcat (pack.name, "-", pack.version, ".tar"); 1197 tfile = cstrcat (pack.name, "-", pack.version, ".tar");
1198 tar (tfile, pack.name); 1198 tar (tfile, pack.name);
1199 try 1199 try
1200 gzip (tfile); 1200 gzip (tfile);
1201 unlink (tfile); 1201 unlink (tfile);
1202 catch 1202 catch
@@ -1231,7 +1231,7 @@ function prepare_installation (desc, packdir)
1231 wd = pwd (); 1231 wd = pwd ();
1232 try 1232 try
1233 cd (packdir); 1233 cd (packdir);
1234 pre_install (desc); 1234 pre_install (desc);
1235 cd (wd); 1235 cd (wd);
1236 catch 1236 catch
1237 cd (wd); 1237 cd (wd);
@@ -1245,13 +1245,13 @@ function prepare_installation (desc, packdir)
1245 [status, msg] = mkdir (inst_dir); 1245 [status, msg] = mkdir (inst_dir);
1246 if (status != 1) 1246 if (status != 1)
1247 rm_rf (desc.dir); 1247 rm_rf (desc.dir);
1248 error ("the 'inst' directory did not exist and could not be created: %s", 1248 error ("the 'inst' directory did not exist and could not be created: %s",
1249 msg); 1249 msg);
1250 endif 1250 endif
1251 endif 1251 endif
1252endfunction 1252endfunction
1253 1253
1254function configure_make (desc, packdir, verbose) 1254function configure_make (desc, packdir, verbose)
1255 ## Perform ./configure, make, make install in "src". 1255 ## Perform ./configure, make, make install in "src".
1256 if (exist (fullfile (packdir, "src"), "dir")) 1256 if (exist (fullfile (packdir, "src"), "dir"))
1257 src = fullfile (packdir, "src"); 1257 src = fullfile (packdir, "src");
@@ -1362,7 +1362,7 @@ function configure_make (desc, packdir, verbose)
1362 printf (" %s", archdependent{:}); 1362 printf (" %s", archdependent{:});
1363 printf (" %s\n", archdir); 1363 printf (" %s\n", archdir);
1364 endif 1364 endif
1365 if (! exist (archdir, "dir")) 1365 if (! exist (archdir, "dir"))
1366 mkdir (archdir); 1366 mkdir (archdir);
1367 endif 1367 endif
1368 [status, output] = copyfile (archdependent, archdir); 1368 [status, output] = copyfile (archdependent, archdir);
@@ -1398,8 +1398,8 @@ endfunction
1398function create_pkgadddel (desc, packdir, nm, global_install) 1398function create_pkgadddel (desc, packdir, nm, global_install)
1399 instpkg = fullfile (desc.dir, nm); 1399 instpkg = fullfile (desc.dir, nm);
1400 instfid = fopen (instpkg, "wt"); 1400 instfid = fopen (instpkg, "wt");
1401 ## If it is exists, most of the PKG_* file should go into the 1401 ## If it is exists, most of the PKG_* file should go into the
1402 ## architecture dependent directory so that the autoload/mfilename 1402 ## architecture dependent directory so that the autoload/mfilename
1403 ## commands work as expected. The only part that doesn't is the 1403 ## commands work as expected. The only part that doesn't is the
1404 ## part in the main directory. 1404 ## part in the main directory.
1405 archdir = fullfile (getarchprefix (desc), cstrcat (desc.name, "-", 1405 archdir = fullfile (getarchprefix (desc), cstrcat (desc.name, "-",
@@ -1465,7 +1465,7 @@ function copy_files (desc, packdir, global_install)
1465 if (! exist (desc.dir, "dir")) 1465 if (! exist (desc.dir, "dir"))
1466 [status, output] = mkdir (desc.dir); 1466 [status, output] = mkdir (desc.dir);
1467 if (status != 1) 1467 if (status != 1)
1468 error ("couldn't create installation directory %s : %s", 1468 error ("couldn't create installation directory %s : %s",
1469 desc.dir, output); 1469 desc.dir, output);
1470 endif 1470 endif
1471 endif 1471 endif
@@ -1493,32 +1493,32 @@ function copy_files (desc, packdir, global_install)
1493 [status, output] = mkdir (octm3); 1493 [status, output] = mkdir (octm3);
1494 if (status != 1) 1494 if (status != 1)
1495 rm_rf (desc.dir); 1495 rm_rf (desc.dir);
1496 error ("couldn't create installation directory %s : %s", 1496 error ("couldn't create installation directory %s : %s",
1497 octm3, output); 1497 octm3, output);
1498 endif 1498 endif
1499 endif 1499 endif
1500 [status, output] = mkdir (octm2); 1500 [status, output] = mkdir (octm2);
1501 if (status != 1) 1501 if (status != 1)
1502 rm_rf (desc.dir); 1502 rm_rf (desc.dir);
1503 error ("couldn't create installation directory %s : %s", 1503 error ("couldn't create installation directory %s : %s",
1504 octm2, output); 1504 octm2, output);
1505 endif 1505 endif
1506 endif 1506 endif
1507 [status, output] = mkdir (octm1); 1507 [status, output] = mkdir (octm1);
1508 if (status != 1) 1508 if (status != 1)
1509 rm_rf (desc.dir); 1509 rm_rf (desc.dir);
1510 error ("couldn't create installation directory %s : %s", 1510 error ("couldn't create installation directory %s : %s",
1511 octm1, output); 1511 octm1, output);
1512 endif 1512 endif
1513 endif 1513 endif
1514 [status, output] = mkdir (octfiledir); 1514 [status, output] = mkdir (octfiledir);
1515 if (status != 1) 1515 if (status != 1)
1516 rm_rf (desc.dir); 1516 rm_rf (desc.dir);
1517 error ("couldn't create installation directory %s : %s", 1517 error ("couldn't create installation directory %s : %s",
1518 octfiledir, output); 1518 octfiledir, output);
1519 endif 1519 endif
1520 endif 1520 endif
1521 [status, output] = movefile (fullfile (desc.dir, getarch (), "*"), 1521 [status, output] = movefile (fullfile (desc.dir, getarch (), "*"),
1522 octfiledir); 1522 octfiledir);
1523 rm_rf (fullfile (desc.dir, getarch ())); 1523 rm_rf (fullfile (desc.dir, getarch ()));
1524 1524
@@ -1753,7 +1753,7 @@ function deps_cell = fix_depends (depends)
1753 version = fix_version (parts{2}); 1753 version = fix_version (parts{2});
1754 1754
1755 ## If no version is specified for the dependency 1755 ## If no version is specified for the dependency
1756 ## we say that the version should be greater than 1756 ## we say that the version should be greater than
1757 ## or equal to "0.0.0". 1757 ## or equal to "0.0.0".
1758 else 1758 else
1759 package = tolower (strip (dep)); 1759 package = tolower (strip (dep));
@@ -1813,7 +1813,7 @@ function write_index (desc, dir, index_file, global_install)
1813 if (err) 1813 if (err)
1814 error ("couldn't read directory %s: %s", tmpdir, msg); 1814 error ("couldn't read directory %s: %s", tmpdir, msg);
1815 endif 1815 endif
1816 files = [files; files2]; 1816 files = [files; files2];
1817 endif 1817 endif
1818 1818
1819 functions = {}; 1819 functions = {};
@@ -1910,7 +1910,7 @@ function [out1, out2] = installed_packages (local_list, global_list)
1910 endfor 1910 endfor
1911 if (! isempty(dup)) 1911 if (! isempty(dup))
1912 installed_pkgs_lst(dup) = []; 1912 installed_pkgs_lst(dup) = [];
1913 endif 1913 endif
1914 1914
1915 ## Now check if the package is loaded. 1915 ## Now check if the package is loaded.
1916 tmppath = strrep (path(), "\\", "/"); 1916 tmppath = strrep (path(), "\\", "/");
@@ -1957,9 +1957,9 @@ function [out1, out2] = installed_packages (local_list, global_list)
1957 h1 = "Package Name"; 1957 h1 = "Package Name";
1958 h2 = "Version"; 1958 h2 = "Version";
1959 h3 = "Installation directory"; 1959 h3 = "Installation directory";
1960 max_name_length = length (h1); 1960 max_name_length = length (h1);
1961 max_version_length = length (h2); 1961 max_version_length = length (h2);
1962 names = cell (num_packages, 1); 1962 names = cell (num_packages, 1);
1963 for i = 1:num_packages 1963 for i = 1:num_packages
1964 max_name_length = max (max_name_length, 1964 max_name_length = max (max_name_length,
1965 length (installed_pkgs_lst{i}.name)); 1965 length (installed_pkgs_lst{i}.name));
@@ -1996,7 +1996,7 @@ function [out1, out2] = installed_packages (local_list, global_list)
1996 first_char = length (cur_dir) - max_dir_length + 4; 1996 first_char = length (cur_dir) - max_dir_length + 4;
1997 first_filesep = strfind (cur_dir(first_char:end), filesep()); 1997 first_filesep = strfind (cur_dir(first_char:end), filesep());
1998 if (! isempty (first_filesep)) 1998 if (! isempty (first_filesep))
1999 cur_dir = cstrcat ("...", 1999 cur_dir = cstrcat ("...",
2000 cur_dir((first_char + first_filesep(1) - 1):end)); 2000 cur_dir((first_char + first_filesep(1) - 1):end));
2001 else 2001 else
2002 cur_dir = cstrcat ("...", cur_dir(first_char:end)); 2002 cur_dir = cstrcat ("...", cur_dir(first_char:end));
@@ -2026,7 +2026,7 @@ function load_packages (files, handle_deps, local_list, global_list)
2026 if (length (files) == 1 && strcmp (files{1}, "all")) 2026 if (length (files) == 1 && strcmp (files{1}, "all"))
2027 idx = [1:length(installed_pkgs_lst)]; 2027 idx = [1:length(installed_pkgs_lst)];
2028 ## Load auto. 2028 ## Load auto.
2029 elseif (length (files) == 1 && strcmp (files{1}, "auto")) 2029 elseif (length (files) == 1 && strcmp (files{1}, "auto"))
2030 idx = []; 2030 idx = [];
2031 for i = 1:length (installed_pkgs_lst) 2031 for i = 1:length (installed_pkgs_lst)
2032 if (exist (fullfile (pdirs{i}, "packinfo", ".autoload"), "file")) 2032 if (exist (fullfile (pdirs{i}, "packinfo", ".autoload"), "file"))
@@ -2162,7 +2162,7 @@ endfunction
2162 2162
2163function archprefix = getarchprefix (desc, global_install) 2163function archprefix = getarchprefix (desc, global_install)
2164 if ((nargin == 2 && global_install) || (nargin < 2 && issuperuser ())) 2164 if ((nargin == 2 && global_install) || (nargin < 2 && issuperuser ()))
2165 archprefix = fullfile (octave_config_info ("libexecdir"), "octave", 2165 archprefix = fullfile (octave_config_info ("libexecdir"), "octave",
2166 "packages", cstrcat(desc.name, "-", desc.version)); 2166 "packages", cstrcat(desc.name, "-", desc.version));
2167 else 2167 else
2168 archprefix = desc.dir; 2168 archprefix = desc.dir;
@@ -2207,7 +2207,7 @@ function newdesc = save_order (desc)
2207 newdesc = {}; 2207 newdesc = {};
2208 for i = 1 : length(desc) 2208 for i = 1 : length(desc)
2209 deps = desc{i}.depends; 2209 deps = desc{i}.depends;
2210 if (isempty (deps) || (length (deps) == 1 && 2210 if (isempty (deps) || (length (deps) == 1 &&
2211 strcmp(deps{1}.package, "octave"))) 2211 strcmp(deps{1}.package, "octave")))
2212 newdesc {end + 1} = desc{i}; 2212 newdesc {end + 1} = desc{i};
2213 else 2213 else
@@ -2220,7 +2220,7 @@ function newdesc = save_order (desc)
2220 endif 2220 endif
2221 endfor 2221 endfor
2222 endfor 2222 endfor
2223 if (! isempty (tmpdesc)) 2223 if (! isempty (tmpdesc))
2224 newdesc = {newdesc{:}, save_order(tmpdesc){:}, desc{i}}; 2224 newdesc = {newdesc{:}, save_order(tmpdesc){:}, desc{i}};
2225 else 2225 else
2226 newdesc{end+1} = desc{i}; 2226 newdesc{end+1} = desc{i};
@@ -2278,7 +2278,7 @@ function idx = load_package_dirs (lidx, idx, handle_deps, installed_pkgs_lst)
2278 else 2278 else
2279 if (handle_deps) 2279 if (handle_deps)
2280 deps = installed_pkgs_lst{i}.depends; 2280 deps = installed_pkgs_lst{i}.depends;
2281 if ((length (deps) > 1) || (length (deps) == 1 && 2281 if ((length (deps) > 1) || (length (deps) == 1 &&
2282 ! strcmp(deps{1}.package, "octave"))) 2282 ! strcmp(deps{1}.package, "octave")))
2283 tmplidx = []; 2283 tmplidx = [];
2284 for k = 1 : length (deps) 2284 for k = 1 : length (deps)
@@ -2289,7 +2289,7 @@ function idx = load_package_dirs (lidx, idx, handle_deps, installed_pkgs_lst)
2289 endif 2289 endif
2290 endfor 2290 endfor
2291 endfor 2291 endfor
2292 idx = load_package_dirs (tmplidx, idx, handle_deps, 2292 idx = load_package_dirs (tmplidx, idx, handle_deps,
2293 installed_pkgs_lst); 2293 installed_pkgs_lst);
2294 endif 2294 endif
2295 endif 2295 endif