update.
[chise/xemacs-chise.git.1] / lisp / package-info.el
index e3be100..7428f49 100644 (file)
 ;      (setq result (md5 (current-buffer))))
 ;    result))
 
+;;; APA: Stolen from package-get in package-get.el
 (defun pi-md5sum (file)
   (with-temp-buffer
-    (call-process "md5sum" file t)
-    (goto-char (point-min))
-    (looking-at "[a-z0-9]+")
-    (buffer-substring (match-beginning 0) (match-end 0))))
+       (insert-file-contents-literally file)
+       (md5 (current-buffer))))
 
 (defun pi-update-key (key value)
   (save-excursion
@@ -95,7 +94,8 @@ author-version -- The original Author's version #.
 maintainer -- The package maintainer.
 category -- The build category."
   (unless noninteractive
-    (error "`batch-update-package-info' is to be used only with -batch"))
+    (error 'invalid-operation
+          "`batch-update-package-info' is to be used only with -batch"))
   (let ((version (nth 0 command-line-args-left))
        (filename (nth 1 command-line-args-left))
        (requires (nth 2 command-line-args-left))