Adrian Aichner <aichner(a)ecf.teradyne.com> writes:
> package-get.el hasn't been augmented in a long time (e.g. I submitted
> a suggestion to make it fetch packages asynchronuously around the end
> of March 98) and I don't think it's ready to ship.
I suggest also the following hack
Index: package-get.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/package-get.el,v
retrieving revision 1.11
diff -u -u -r1.11 package-get.el
--- package-get.el 1998/06/14 23:12:36 1.11
+++ package-get.el 1998/06/16 23:03:50
@@ -156,10 +156,13 @@
List format is '(site-name directory-on-site). Each site is tried in
order until the package is found.")
-(defvar package-get-remove-copy nil
+(defvar package-get-remove-copy t
"*After copying and installing a package, if this is T, then remove the
copy. Otherwise, keep it around.")
+(defvar package-get-installed-in-this-session nil
+ "List of package succesfully installed this session")
+
;;;###autoload
(defun package-get-update-all ()
"Fetch and install the latest versions of all currently installed packages."
@@ -233,7 +236,6 @@
(package-get-info-version
(package-get-info-find-package package-get-base
package) version))
- (found nil)
(search-dirs package-get-remote)
(filename (package-get-info-prop this-package 'filename)))
(if (null this-package)
@@ -243,6 +245,8 @@
(error "No filename associated with package %s, version %s"
package version))
(setq version (package-get-info-prop this-package 'version))
+ (unless (floatp version)
+ (setq version (string-to-number version)))
(unless (and (eq conflict 'never)
(package-get-installedp package version))
;; Find the package from search list in package-get-remote
@@ -270,17 +274,18 @@
(error "Package %s does not match md5 checksum" filename)))
(message "Retrieved package %s" filename) (sit-for 0)
(let ((status
- (package-admin-add-binary-package
- (package-get-staging-dir filename))))
- (when (not (= status 0))
+ (package-admin-add-binary-package
+ (package-get-staging-dir filename))))
+ (if (= status 0)
+ (progn
+ (message "Added package")
+ (if package-get-remove-copy
+ (delete-file (package-get-staging-dir filename)))
+ (push (list package :version version)
+ package-get-installed-in-this-session))
(message "Package failed.")
- (switch-to-buffer package-admin-temp-buffer)))
- (sit-for 0)
- (message "Added package") (sit-for 0)
- (setq found t))
- (if (and found package-get-remove-copy)
- (delete-file (package-get-staging-dir filename)))
- ))
+ (switch-to-buffer package-admin-temp-buffer))
+ (sit-for 0)))))
(defun package-get-info-find-package (which name)
"Look in WHICH for the packaged called NAME and return all the info
@@ -372,9 +377,8 @@
some built in variables. For now, use packages-package-list."
;; Use packages-package-list which contains name and version
(equal (plist-get
- (package-get-info-find-package packages-package-list
- package) ':version)
- (if (floatp version) version (string-to-number version))))
+ (package-get-info-find-package (append package-get-installed-in-this-session packages-package-list) package) ':version)
+ (if (floatp version) version (string-to-number version))))
(defun package-get-package-provider (sym)
"Search for a package that provides SYM and return the name and