Adrian Aichner <Adrian.Aichner(a)t-online.de> writes:
COMMIT
Greetings!
Based on Steve being away and the current brokenness of the code for
people with "EMACSPACKAGEPATH" containing ~/.xemacs I am commiting
this right away.
Best regards,
Adrian
xemacs-21.5 ChangeLog patch:
Diff command: cvs -q diff -U 0
Files affected: lisp/ChangeLog
Index: lisp/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.512
diff -u -U0 -r1.512 ChangeLog
--- lisp/ChangeLog 2003/06/30 09:24:47 1.512
+++ lisp/ChangeLog 2003/07/05 08:36:37
@@ -0,0 +1,17 @@
+2003-07-05 Adrian Aichner <adrian(a)xemacs.org>
+
+ * package-admin.el (package-admin-find-top-directory): Simplify
+ directory comparisions and fix substring errors on short path
+ components.
+ * package-get.el (package-get-package-index-file-location):
+ Default to first component of "EMACSPACKAGEPATH", if set.
+
xemacs-21.5 source patch:
Diff command: cvs -f -z3 -q diff -u -N
Files affected: lisp/package-get.el lisp/package-admin.el
Index: lisp/package-admin.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/package-admin.el,v
retrieving revision 1.23
diff -u -r1.23 package-admin.el
--- lisp/package-admin.el 2003/05/02 22:51:04 1.23
+++ lisp/package-admin.el 2003/07/05 08:33:01
@@ -173,14 +173,16 @@
(let ((path-list (paths-decode-directory-path env-value 'drop-empties)))
(cond ((eq type 'std)
(while path-list
- (if (equal (substring (car path-list) -16)
- (concat "xemacs-packages" (char-to-string directory-sep-char)))
+ (if (equal (file-name-nondirectory
+ (directory-file-name (car path-list)))
+ "xemacs-packages")
(setq top-dir (car path-list)))
(setq path-list (cdr path-list))))
((eq type 'mule)
(while path-list
- (if (equal (substring (car path-list) -14)
- (concat "mule-packages" (char-to-string directory-sep-char)))
+ (if (equal (file-name-nondirectory
+ (directory-file-name (car path-list)))
+ "mule-packages")
(setq top-dir (car path-list)))
(setq path-list (cdr path-list)))))))
;; Wasn't in the environment, try `user-init-directory' if
Index: lisp/package-get.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/package-get.el,v
retrieving revision 1.63
diff -u -r1.63 package-get.el
--- lisp/package-get.el 2003/05/14 23:57:35 1.63
+++ lisp/package-get.el 2003/07/05 08:33:02
@@ -171,7 +171,7 @@
;;;###autoload
(defcustom package-get-package-index-file-location
- (or (getenv "EMACSPACKAGEPATH")
+ (or (car (split-path (getenv "EMACSPACKAGEPATH")))
user-init-directory)
"*The directory where the package-index file can be found."
:type 'directory
Unfortunately, this patch breaks my build:
...
No autoloads found in lisp/x-select.el
Generating autoloads for lisp/x-win-sun.el...
Generating autoloads for lisp/x-win-xfree86.el...
Saving file /opt/src/xemacs-21.5-2003-07-05-1200/lisp/auto-autoloads.el...
Wrote /opt/src/xemacs-21.5-2003-07-05-1200/lisp/auto-autoloads.el
Wrote /opt/src/xemacs-21.5-2003-07-05-1200/lisp/auto-autoloads.el
Compiling /opt/src/xemacs-21.5-2003-07-05-1200/lisp/auto-autoloads.el...
Wrote /opt/src/xemacs-21.5-2003-07-05-1200/lisp/auto-autoloads.elc
Loading /opt/build/xemacs-21.5-2003-07-05-1200/lisp/auto-autoloads...
# bind (stack-trace-on-signal debug-on-signal stack-trace-on-error debug-on-error)
# (unwind-protect ...)
split-path(nil)
(car (split-path (getenv "EMACSPACKAGEPATH")))
(or (car (split-path (getenv "EMACSPACKAGEPATH"))) user-init-directory)
eval((or (car (split-path (getenv "EMACSPACKAGEPATH"))) user-init-directory))
(cond ((default-boundp symbol) (funcall (or (get symbol (quote custom-get)) (quote
default-value)) symbol)) ((get symbol (quote saved-value)) (eval (car (get symbol (quote
saved-value))))) (t (eval value)))
(funcall (or (get symbol (quote custom-set)) (quote set-default)) symbol (cond
((default-boundp symbol) (funcall (or (get symbol (quote custom-get)) (quote
default-value)) symbol)) ((get symbol (quote saved-value)) (eval (car (get symbol (quote
saved-value))))) (t (eval value))))
# bind (value symbol)
custom-initialize-reset(package-get-package-index-file-location (or (car (split-path
(getenv "EMACSPACKAGEPATH"))) user-init-directory))
funcall(custom-initialize-reset package-get-package-index-file-location (or (car
(split-path (getenv "EMACSPACKAGEPATH"))) user-init-directory))
# bind (requests initialize)
(let ((initialize (quote custom-initialize-reset)) (requests nil)) (while args (let
((arg (car args))) (setq args (cdr args)) (check-argument-type (quote keywordp) arg) (let
((keyword arg) (value (car args))) (unless args (signal (quote error) (list "Keyword
is missing an argument" keyword))) (setq args (cdr args)) (cond ((eq keyword
:initialize) (setq initialize value)) ((eq keyword :set) (put symbol (quote custom-set)
value)) ((eq keyword :get) (put symbol (quote custom-get) value)) ((eq keyword :require)
(setq requests (cons value requests))) ((eq keyword :type) (put symbol (quote custom-type)
value)) ((eq keyword :options) (if (get symbol (quote custom-options)) (mapc (lambda
(option) (custom-add-option symbol option)) value) (put symbol (quote custom-options)
(copy-sequence value)))) (t (custom-handle-keyword symbol keyword value (quote
custom-variable))))))) (put symbol (quote custom-requests) requests) (funcall initialize
symbol default))
# bind (args doc default symbol)
custom-declare-variable(package-get-package-index-file-location (or (car (split-path
(getenv "EMACSPACKAGEPATH"))) user-init-directory) "*The directory where
the package-index file can be found." :type directory :group package-get)
# bind (current-load-list)
# (unwind-protect ...)
# bind (load-file-name)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
load-internal("/opt/build/xemacs-21.5-2003-07-05-1200/lisp/auto-autoloads" nil
t nil binary)
(if (and (> (length filename) 0) (setq path (locate-file filename load-path (and (not
nosuffix) (quote (".elc" ".el" "")))))) (load-internal file
noerror nomessage nosuffix (let ((elc (equalp ".elc" (substring path -4)))) (or
(and (not elc) coding-system-for-read) (let ((codesys
(find-coding-system-magic-cookie-in-file path))) (when codesys (setq codesys (intern
codesys)) (if (find-coding-system codesys) codesys))) (if elc (quote binary) (or
(find-file-coding-system-for-read-from-filename path)
buffer-file-coding-system-for-read))))) (if (and (> (length filename) 0) (locate-file
filename module-load-path (and (not nosuffix) (quote (".ell" ".dll"
".so" ""))))) (if (featurep (quote modules)) (let
((load-modules-quietly nomessage)) (declare-fboundp (load-module filename))) (signal
(quote file-error) (quote ("This XEmacs does not support modules")))) (and (null
noerror) (signal (quote file-error) (list "Cannot open load file" filename)))))
(if handler (funcall handler (quote load) filename noerror nomessage nosuffix) (if (and
(> (length filename) 0) (setq path (locate-file filename load-path (and (not nosuffix)
(quote (".elc" ".el" "")))))) (load-internal file noerror
nomessage nosuffix (let ((elc (equalp ".elc" (substring path -4)))) (or (and
(not elc) coding-system-for-read) (let ((codesys (find-coding-system-magic-cookie-in-file
path))) (when codesys (setq codesys (intern codesys)) (if (find-coding-system codesys)
codesys))) (if elc (quote binary) (or (find-file-coding-system-for-read-from-filename
path) buffer-file-coding-system-for-read))))) (if (and (> (length filename) 0)
(locate-file filename module-load-path (and (not nosuffix) (quote (".ell"
".dll" ".so" ""))))) (if (featurep (quote modules)) (let
((load-modules-quietly nomessage)) (declare-fboundp (load-module filename))) (signal
(quote file-error) (quote ("This XEmacs does not support modules")))) (and (null
noerror) (signal (quote file-error) (list "Cannot open load file"
filename))))))
# bind (path handler filename)
(let* ((filename (substitute-in-file-name file)) (handler (find-file-name-handler
filename (quote load))) (path nil)) (if handler (funcall handler (quote load) filename
noerror nomessage nosuffix) (if (and (> (length filename) 0) (setq path (locate-file
filename load-path (and (not nosuffix) (quote (".elc" ".el"
"")))))) (load-internal file noerror nomessage nosuffix (let ((elc (equalp
".elc" (substring path -4)))) (or (and (not elc) coding-system-for-read) (let
((codesys (find-coding-system-magic-cookie-in-file path))) (when codesys (setq codesys
(intern codesys)) (if (find-coding-system codesys) codesys))) (if elc (quote binary) (or
(find-file-coding-system-for-read-from-filename path)
buffer-file-coding-system-for-read))))) (if (and (> (length filename) 0) (locate-file
filename module-load-path (and (not nosuffix) (quote (".ell" ".dll"
".so" ""))))) (if (featurep (quote modules)) (let
((load-modules-quietly nomessage)) (declare-fboundp (load-module filename))) (signal
(quote file-error) (quote ("This XEmacs does not support modules")))) (and (null
noerror) (signal (quote file-error) (list "Cannot open load file"
filename)))))))
# bind (nosuffix nomessage noerror file)
load("/opt/build/xemacs-21.5-2003-07-05-1200/lisp/auto-autoloads" nil t)
(progn (load (expand-file-name (file-name-sans-extension autoload-file-name)
lisp-directory) nil t) (when (featurep (quote mule)) (load (expand-file-name
(file-name-sans-extension autoload-file-name) (file-name-as-directory (expand-file-name
"mule" lisp-directory))) nil t)))
(if (and (not inhibit-autoloads) lisp-directory) (progn (load (expand-file-name
(file-name-sans-extension autoload-file-name) lisp-directory) nil t) (when (featurep
(quote mule)) (load (expand-file-name (file-name-sans-extension autoload-file-name)
(file-name-as-directory (expand-file-name "mule" lisp-directory))) nil t))))
(when (and (not inhibit-autoloads) lisp-directory) (load (expand-file-name
(file-name-sans-extension autoload-file-name) lisp-directory) nil t) (when (featurep
(quote mule)) (load (expand-file-name (file-name-sans-extension autoload-file-name)
(file-name-as-directory (expand-file-name "mule" lisp-directory))) nil t)))
startup-load-autoloads()
funcall(startup-load-autoloads)
# bind (arg)
command-line-do-funcall("-f")
funcall(command-line-do-funcall "-f")
(cond (end-of-options (setq file-p t)) ((setq tem (when (eq (aref arg 0) ?-) (or (assoc
arg command-switch-alist) (assoc (substring arg 1) command-switch-alist)))) (funcall (cdr
tem) arg)) ((string-match "\\`\\+[0-9]+\\'" arg) (setq line (string-to-int
arg))) ((or (string= arg "-") (string= arg "--")) (setq end-of-options
t)) (t (setq file-p t)))
(while command-line-args-left (setq arg (pop command-line-args-left)) (cond
(end-of-options (setq file-p t)) ((setq tem (when (eq (aref arg 0) ?-) (or (assoc arg
command-switch-alist) (assoc (substring arg 1) command-switch-alist)))) (funcall (cdr tem)
arg)) ((string-match "\\`\\+[0-9]+\\'" arg) (setq line (string-to-int arg)))
((or (string= arg "-") (string= arg "--")) (setq end-of-options t)) (t
(setq file-p t))) (when file-p (setq file-p nil) (incf file-count) (setq arg
(expand-file-name arg dir)) (cond ((= file-count 1) (find-file arg)) (noninteractive
(find-file arg)) (t (find-file-other-window arg))) (when line (goto-line line) (setq line
nil))))
# bind (tem arg file-p end-of-options line file-count dir)
(let ((dir command-line-default-directory) (file-count 0) (line nil) (end-of-options
nil) file-p arg tem) (while command-line-args-left (setq arg (pop command-line-args-left))
(cond (end-of-options (setq file-p t)) ((setq tem (when (eq (aref arg 0) ?-) (or (assoc
arg command-switch-alist) (assoc (substring arg 1) command-switch-alist)))) (funcall (cdr
tem) arg)) ((string-match "\\`\\+[0-9]+\\'" arg) (setq line (string-to-int
arg))) ((or (string= arg "-") (string= arg "--")) (setq end-of-options
t)) (t (setq file-p t))) (when file-p (setq file-p nil) (incf file-count) (setq arg
(expand-file-name arg dir)) (cond ((= file-count 1) (find-file arg)) (noninteractive
(find-file arg)) (t (find-file-other-window arg))) (when line (goto-line line) (setq line
nil)))))
(cond ((null command-line-args-left) (unless noninteractive (run-hooks (quote
term-setup-hook)) (setq term-setup-hook nil) (when (string= (buffer-name)
"*scratch*") (unless (or inhibit-startup-message (input-pending-p)) (let (tmout
circ-tmout) (unwind-protect (catch (quote tmout) (setq tmout (add-timeout
startup-message-timeout (lambda (ignore) (condition-case nil (throw (quote tmout) t)
(error nil))) nil)) (setq circ-tmout (display-splash-frame)) (or nil (goto-char
(point-min))) (sit-for 0) (setq unread-command-event (next-command-event))) (when tmout
(disable-timeout tmout)) (when circ-tmout (disable-timeout circ-tmout)))))
(with-current-buffer (get-buffer "*scratch*") (erase-buffer) (when (stringp
initial-scratch-message) (insert initial-scratch-message)) (set-buffer-modified-p nil)))))
(t (let ((dir command-line-default-directory) (file-count 0) (line nil) (end-of-options
nil) file-p arg tem) (while command-line-args-left (setq arg (pop command-line-args-left))
(cond (end-of-options (setq file-p t)) ((setq tem (when (eq (aref arg 0) ?-) (or (assoc
arg command-switch-alist) (assoc (substring arg 1) command-switch-alist)))) (funcall (cdr
tem) arg)) ((string-match "\\`\\+[0-9]+\\'" arg) (setq line (string-to-int
arg))) ((or (string= arg "-") (string= arg "--")) (setq end-of-options
t)) (t (setq file-p t))) (when file-p (setq file-p nil) (incf file-count) (setq arg
(expand-file-name arg dir)) (cond ((= file-count 1) (find-file arg)) (noninteractive
(find-file arg)) (t (find-file-other-window arg))) (when line (goto-line line) (setq line
nil)))))))
command-line-1()
# bind (command-line-args-left)
(let ((command-line-args-left (cdr command-line-args))) (let ((debugger (quote
early-error-handler)) (debug-on-error t)) (setq command-line-args-left (command-line-early
command-line-args-left)) (when (eq system-type (quote windows-nt)) (declare-fboundp
(init-mswindows-at-startup))) (when (featurep (quote toolbar)) (init-toolbar-location))
(if (featurep (quote toolbar)) (if (featurep (quote infodock)) (require (quote
id-x-toolbar)) (init-toolbar))) (when (and initial-window-system (not noninteractive))
(funcall (intern (concat "init-" (symbol-name initial-window-system)
"-win")))) (frame-initialize)) (startup-initialize-custom-faces) (if (featurep
(quote menubar)) (init-menubar-at-startup)) (if (featurep (quote mule)) (declare-fboundp
(init-mule-at-startup))) (load-init-file) (with-current-buffer (get-buffer
"*scratch*") (erase-buffer) (set-buffer-modified-p nil) (when (eq major-mode
(quote fundamental-mode)) (funcall initial-major-mode))) (when (and (eq (quote tty)
(console-type)) (not (noninteractive))) (load-terminal-library)) (command-line-1) (setq
inhibit-warning-display nil) (when (noninteractive) (kill-emacs t)))
command-line()
(if (noninteractive) (command-line) (condition-case data (command-line) (t (setq
error-data data))))
# bind (error-data)
(let (error-data) (if (noninteractive) (command-line) (condition-case data
(command-line) (t (setq error-data data)))) (setq default-directory (abbreviate-file-name
default-directory)) (if auto-save-list-file-prefix (setq auto-save-list-file-name
(expand-file-name (format "%s%d-%s" auto-save-list-file-prefix (emacs-pid)
(system-name))))) (run-hooks (quote emacs-startup-hook)) (and term-setup-hook (run-hooks
(quote term-setup-hook))) (setq term
xemacs exiting.
-setup-hook nil) (frame-notice-user-settings) (when window-setup-hook (run-hooks (quote
window-setup-hook))) (setq window-setup-hook nil) (if error-data (signal-error (car
error-data) (cdr error-data))))
(if command-line-processed (message "Back to top level.") (setq
command-line-processed t) (when (getenv "XEMACSDEBUG") (eval (read (getenv
"XEMACSDEBUG")))) (let ((value (user-home-directory))) (if (and value (<
(length value) (length default-directory)) (equal (file-attributes default-directory)
(file-attributes value))) (setq default-directory (file-name-as-directory value)))) (setq
default-directory (abbreviate-file-name default-directory)) (initialize-xemacs-paths)
(startup-set-invocation-environment) (startup-setup-paths (cond (inhibit-all-packages t)
(inhibit-early-packages (quote (early))) (t nil)) nil) (startup-setup-paths-warning)
(startup-load-autoloads) (let (error-data) (if (noninteractive) (command-line)
(condition-case data (command-line) (t (setq error-data data)))) (setq default-directory
(abbreviate-file-name default-directory)) (if auto-save-list-file-prefix (setq
auto-save-list-file-name (expand-file-name (format "%s%d-%s"
auto-save-list-file-prefix (emacs-pid) (system-name))))) (run-hooks (quote
emacs-startup-hook)) (and term-setup-hook (run-hooks (quote term-setup-hook))) (setq
term-setup-hook nil) (frame-notice-user-settings) (when window-setup-hook (run-hooks
(quote window-setup-hook))) (setq window-setup-hook nil) (if error-data (signal-error (car
error-data) (cdr error-data)))) (if load-user-init-file-p
(maybe-migrate-user-init-file)))
normal-top-level()
# (condition-case ... . error)
# (catch top-level ...)
Wrong type argument: stringp, nilmake[1]: *** [NEEDTODUMP] Error 255
make[1]: Leaving directory `/opt/build/xemacs-21.5-2003-07-05-1200/src'
make: *** [src] Error 2
Here is the Installation file:
uname -a: Linux
zion.rcn.com 2.4.21-0.13mdkcustom #4 SMP Sat Mar 8 23:08:38 EST 2003 i686
unknown unknown GNU/Linux
../../src/xemacs-21.5-2003-07-05-1200/configure
'--prefix=/usr/local/xemacs-21.5-2003-07-05-1200'
'--site-includes=/usr/local/include' '--site-libraries=/usr/local/lib'
'--infopath=/usr/local/info' '--with-mule=no' '--compiler=icc'
'--cflags=-O3 -tpp6 -axK -xK -ip' '--with-dialogs=no'
'--with-widgets=no'
'--package-path=/usr/local/site-packages::/usr/local/xemacs-packages'
'--pdump=no' '--debug=no' '--error-checking=none'
XEmacs 21.5-b14 "cassava" (+CVS-20030704) configured for `i686-pc-linux'.
Compilation / Installation:
Source code location: /opt/src/xemacs-21.5-2003-07-05-1200
Installation prefix: /usr/local/xemacs-21.5-2003-07-05-1200
Additional header files: /usr/local/include
Additional libraries: /usr/local/lib
Operating system description file: `s/linux.h'
Machine description file: `m/intel386.h'
Compiler: icc -O3 -tpp6 -axK -xK -ip
Relocating allocator for buffers: no
GNU version of malloc: yes
- Using Doug Lea's new malloc from the GNU C Library.
Linking with `-z nocombreloc'.
- Consider configuring with --pdump.
Window System:
Compiling in support for the X window system:
- X Windows headers location: /usr/X11R6/include
- X Windows libraries location: /usr/X11R6/lib
- Handling WM_COMMAND properly.
Using Lucid menubars.
Using Lucid scrollbars.
TTY:
Compiling in support for ncurses.
Images:
Compiling in support for GIF images (builtin).
Compiling in support for XPM images.
Compiling in support for PNG images.
Compiling in support for JPEG images.
Compiling in support for TIFF images.
Compiling in support for X-Face message headers.
Sound:
Compiling in support for sound (native).
Databases:
Internationalization:
Mail:
Compiling in support for "dot-locking" mail spool file locking method.
Other Features:
Inhibiting IPv6 canonicalization at startup.
Adrian, can you please investigate?
TIA,
Vin