Mercurial > hg > xemacs-beta
comparison lisp/package-get.el @ 382:064ab7fed2e0 r21-2-6
Import from CVS: tag r21-2-6
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:07:39 +0200 |
parents | 8626e4521993 |
children | bbff43aa5eb7 |
comparison
equal
deleted
inserted
replaced
381:908a86f940e6 | 382:064ab7fed2e0 |
---|---|
258 (defun package-get-download-menu () | 258 (defun package-get-download-menu () |
259 "Build the `Add Download Site' menu." | 259 "Build the `Add Download Site' menu." |
260 (mapcar (lambda (site) | 260 (mapcar (lambda (site) |
261 (vector (car site) | 261 (vector (car site) |
262 `(push (quote ,(cdr site)) | 262 `(push (quote ,(cdr site)) |
263 package-get-remote))) | 263 package-get-remote) |
264 :style 'toggle | |
265 :selected `(member (quote ,(cdr site)) | |
266 package-get-remote))) | |
264 package-get-download-sites)) | 267 package-get-download-sites)) |
265 | 268 |
266 ;;;###autoload | 269 ;;;###autoload |
267 (defun package-get-require-base (&optional force-current) | 270 (defun package-get-require-base (&optional force-current) |
268 "Require that a package-get database has been loaded. | 271 "Require that a package-get database has been loaded. |
700 (search-dirs package-get-remote) | 703 (search-dirs package-get-remote) |
701 (base-filename (package-get-info-prop this-package 'filename)) | 704 (base-filename (package-get-info-prop this-package 'filename)) |
702 (package-status t) | 705 (package-status t) |
703 filenames full-package-filename) | 706 filenames full-package-filename) |
704 (if (null this-package) | 707 (if (null this-package) |
705 (error "Couldn't find package %s with version %s" | 708 (if package-get-remote |
706 package version)) | 709 (error "Couldn't find package %s with version %s" |
710 package version) | |
711 (error "No download sites or local package locations specified."))) | |
707 (if (null base-filename) | 712 (if (null base-filename) |
708 (error "No filename associated with package %s, version %s" | 713 (error "No filename associated with package %s, version %s" |
709 package version)) | 714 package version)) |
710 (setq install-dir | 715 (setq install-dir |
711 (package-admin-get-install-dir package install-dir | 716 (package-admin-get-install-dir package install-dir |
802 ) | 807 ) |
803 )) | 808 )) |
804 | 809 |
805 (if (or (not full-package-filename) | 810 (if (or (not full-package-filename) |
806 (not (file-exists-p full-package-filename))) | 811 (not (file-exists-p full-package-filename))) |
807 (error "Unable to find file %s" base-filename)) | 812 (if package-get-remote |
813 (error "Unable to find file %s" base-filename) | |
814 (error | |
815 "No download sites or local package locations specified."))) | |
808 ;; Validate the md5 checksum | 816 ;; Validate the md5 checksum |
809 ;; Doing it with XEmacs removes the need for an external md5 program | 817 ;; Doing it with XEmacs removes the need for an external md5 program |
810 (message "Validating checksum for `%s'..." package) (sit-for 0) | 818 (message "Validating checksum for `%s'..." package) (sit-for 0) |
811 (with-temp-buffer | 819 (with-temp-buffer |
812 ;; What ever happened to i-f-c-literally | 820 ;; What ever happened to i-f-c-literally |
935 site-name:remote-directory/filename | 943 site-name:remote-directory/filename |
936 " | 944 " |
937 (if (efs-ftp-path filename) | 945 (if (efs-ftp-path filename) |
938 filename | 946 filename |
939 (let ((dir (cadr search))) | 947 (let ((dir (cadr search))) |
940 (concat "/" | 948 (concat (if (string-match "@" (car search)) |
949 "/" | |
950 "/anonymous@") | |
941 (car search) ":" | 951 (car search) ":" |
942 (if (string-match "/$" dir) | 952 (if (string-match "/$" dir) |
943 dir | 953 dir |
944 (concat dir "/")) | 954 (concat dir "/")) |
945 filename)))) | 955 filename)))) |