Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Prevent errors when migrating status file

Previously, if a package is listed as installed but it doesn't have a
recipe available, then status file migration would fail with an error
because it requires a recipe to save into the new status format. Now,
when this occurs, it just saves a "dummy" recipe that does nothing
instead. This does not result in any loss of functionality, since
without an available recipe the package in question is unusable
anyway.
  • Loading branch information...
commit 7256607fc24956d018c095e0d61f2f2d69f5fd58 1 parent 1ec4d9e
Ryan C. Thompson DarwinAwardWinner authored
Showing with 12 additions and 4 deletions.
  1. +12 −4 el-get-status.el
16 el-get-status.el
View
@@ -85,10 +85,18 @@
(loop for (p s) on ps by 'cddr
for psym = (el-get-package-symbol p)
when psym
- collect (cons psym
- (list 'status s
- 'recipe (when (string= s "installed")
- (el-get-package-def psym))))))))
+ collect
+ (cons psym
+ (list 'status s
+ 'recipe (when (string= s "installed")
+ (condition-case nil
+ (el-get-package-def psym)
+ ;; If the recipe is not
+ ;; available any more,
+ ;; just provide a
+ ;; placeholder no-op
+ ;; recipe.
+ (error `(:name ,psym :type builtin))))))))))
(defun el-get-package-status-alist (&optional package-status-alist)
"return an alist of (PACKAGE . STATUS)"
Please sign in to comment.
Something went wrong with that request. Please try again.