Mercurial > hg > xemacs-beta
comparison lisp/package-get.el @ 284:558f606b08ae r21-0b40
Import from CVS: tag r21-0b40
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:34:13 +0200 |
parents | 90d73dddcdc4 |
children | 57709be46d1b |
comparison
equal
deleted
inserted
replaced
283:fa3d41851a08 | 284:558f606b08ae |
---|---|
254 (package-get-staging-dir filename)) | 254 (package-get-staging-dir filename)) |
255 (setq search-dirs (cdr search-dirs)) | 255 (setq search-dirs (cdr search-dirs)) |
256 )) | 256 )) |
257 (if (not (file-exists-p (package-get-staging-dir filename))) | 257 (if (not (file-exists-p (package-get-staging-dir filename))) |
258 (error "Unable to find file %s" filename)) | 258 (error "Unable to find file %s" filename)) |
259 ;; | |
260 ;; Validate the md5 checksum | 259 ;; Validate the md5 checksum |
261 ;; Unfortunately we cannot do this in XEmacs due to Mule lossage. | 260 ;; Doing it with XEmacs removes the need for an external md5 program |
262 ;; | |
263 (with-temp-buffer | 261 (with-temp-buffer |
264 (call-process "md5sum" (package-get-staging-dir filename) t) | 262 ; What ever happened to i-f-c-literally |
265 (goto-char (point-min)) | 263 (let (file-name-handler-alist) |
266 (looking-at "[a-z0-9]+") | 264 (insert-file-contents-internal (package-get-staging-dir filename))) |
267 (if (not (string= (buffer-substring (match-beginning 0) (match-end 0)) | 265 (if (not (string= (md5 (current-buffer)) |
268 (package-get-info-prop this-package 'md5sum))) | 266 (package-get-info-prop this-package |
267 'md5sum))) | |
269 (error "Package %s does not match md5 checksum" filename))) | 268 (error "Package %s does not match md5 checksum" filename))) |
270 (message "Retrieved package %s" filename) (sit-for 0) | 269 (message "Retrieved package %s" filename) (sit-for 0) |
271 (let ((status | 270 (let ((status |
272 (if (eq (package-get-info-prop this-package 'type) 'single) | 271 (if (eq (package-get-info-prop this-package 'type) 'single) |
273 (package-admin-add-single-file-package filename | 272 (package-admin-add-single-file-package filename |