In building 5.30 from git, I have come across a bunch of errors
related to building the online info system. This has revealed that
there is no error handling in cl-info::load-primary-index. I have a
patch for this (below). The patch uses handler-case to demote an error
to a warning. This will catch index files that are missing or
malformed.
I know there are a bunch of fingerprints on cl-info.lisp at the
moment, so I would like to ask the relevant people take a look at
this before committing it.
Example:
MAXIMA> (load "src/cl-info.lisp")
T
MAXIMA> (cl-info::load-primary-index)
WARNING: CL-INFO::LOAD-PRIMARY-INDEX: LOAD: A file with name
/usr/local/share/info/maxima-index.lisp does not exist
Skipping...
NIL
MAXIMA> (let ((maxima::*maxima-infodir* "doc/info/")) (cl-info::load-primary-index))
WARNING: CL-INFO::LOAD-PRIMARY-INDEX:
EVAL/APPLY: Too few arguments (0 instead of at least 3) given to
CL-INFO::LOAD-INFO-HASHTABLES
Skipping...
NIL
MAXIMA> ($build_info)
((%BUILD_INFO SIMP) "5.30.0_2_g49e46ec_dirty" "2013-06-20 09:20:39"
"i686-pc-linux-gnu" "CLISP"
"2.49 (2010-07-07) (built 3577230288) (memory 3580723249)")
Patch:
diff --git a/src/cl-info.lisp b/src/cl-info.lisp
index 0a000c5..b783c44 100644
--- a/src/cl-info.lisp
+++ b/src/cl-info.lisp
@@ -60,10 +60,12 @@
(let*
((subdir-bit (or maxima::*maxima-lang-subdir* "."))
(path-to-index (maxima::combine-path maxima::*maxima-infodir* subdir-bit "maxima-index.lisp")))
- #-gcl
- (with-standard-io-syntax (load path-to-index))
- #+gcl
- (let ((*read-base* 10.)) (load path-to-index))))
+ (handler-case
+ #-gcl
+ (with-standard-io-syntax (load path-to-index))
+ #+gcl
+ (let ((*read-base* 10.)) (load path-to-index))
+ (error (condition) (warn (intl:gettext (format nil "~&CL-INFO::LOAD-PRIMARY-INDEX: ~a~&Skipping...~%" condition)))))))
(defun info-exact (x)
(let ((exact-matches (exact-topic-match x)))