changeset 1561:6f4c71266175

[xemacs-hg @ 2003-07-05 08:40:36 by adrian] xemacs-21.5: package installation fixes -------------------- ChangeLog entries follow: -------------------- lisp/ChangeLog addition: 2003-07-05 Adrian Aichner <adrian@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.
author adrian
date Sat, 05 Jul 2003 08:40:37 +0000
parents c69c3868eeeb
children ae5f077a6dd9
files lisp/ChangeLog lisp/package-admin.el lisp/package-get.el
diffstat 3 files changed, 15 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Jul 04 21:52:20 2003 +0000
+++ b/lisp/ChangeLog	Sat Jul 05 08:40:37 2003 +0000
@@ -1,3 +1,11 @@
+2003-07-05  Adrian Aichner  <adrian@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.
+
 2003-06-17  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* bytecomp.el (byte-compile-lambda): Discard docstring only if it
--- a/lisp/package-admin.el	Fri Jul 04 21:52:20 2003 +0000
+++ b/lisp/package-admin.el	Sat Jul 05 08:40:37 2003 +0000
@@ -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
--- a/lisp/package-get.el	Fri Jul 04 21:52:20 2003 +0000
+++ b/lisp/package-get.el	Sat Jul 05 08:40:37 2003 +0000
@@ -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