Skip to content

Could not retrieve cached recipe for package package #797

Closed
mofaph opened this Issue Jul 6, 2012 · 13 comments

6 participants

@mofaph
mofaph commented Jul 6, 2012

el-get version 4.0.7.8fc85a4
checksum: 8fc85a4

Hi, all.

Thank you for writing such wonderful el-get, it makes my life
more easier.

Recently, I found a problem about el-get.

This problem affected me when I intended to install slime.

I tried el-get-elpa-build-local-recipes, but it seems useless.
I also tried el-get-install slime, again it doesn't work.

But after I el-get-remove the package named package, everything is OK.

Thanks.

@dimitri
Owner
dimitri commented Jul 17, 2012

I had bad luck installing SLIME with el-get too, I recommend using Quicklisp to install it: http://www.quicklisp.org/beta/

@SamB
SamB commented Sep 26, 2012

I'm getting a similar message upon starting Emacs, only about ucs-utils, which doesn't appear to be mentioned in .status.el at all. (This started happening when I upgraded from Emacs 24.1 to Emacs 24.2.)

@SamB
SamB commented Sep 27, 2012

Actually, wait, I never did complete the update ... this was purely el-get!

@dimitri
Owner
dimitri commented Sep 28, 2012

Can we close the issue then? :)

@dimitri dimitri closed this Dec 14, 2012
@stardiviner

I got this message Could not retrieve cached recipe for package request too. And my Emacs version GNU Emacs 24.1.1. Ubutnu Linux. latest master branch el-get.

@stardiviner

After try el-get-reinstall request, I got error: fatal: Not a git repository: ../../../../../../../Git/dotfiles/.emacs.d/el-get/request/.git/modules/tools/el4t/modules/lib/ert . Failed to recurse into submodule path 'tools/el4t'.

@stardiviner

After add :submodule nil into request recipe. it is solved now.

@tkf tkf added a commit that referenced this issue Jan 18, 2013
@tkf tkf Do not download submodules for request
Submodules for request.el are for development and
it solves the problem @NagatoPain mentioned in #797.
1289fa2
@dabrahams

Well, I got the same error. I must add that something seems fundamentally wrong about triggering a hard error when data is missing from a cache. That's expected to happen with caches; the usual response is to fetch the missing data into the cache automatically and proceed as if it was always there.

Debugger entered--Lisp error: (error "Could not retrieve cached recipe for package gnus")
  signal(error ("Could not retrieve cached recipe for package gnus"))
  error("Could not retrieve cached recipe for package %s" gnus)
  (or (el-get-read-package-status-recipe package package-status-alist) (error "Could not retrieve cached recipe for package %s" package))
  (let* ((save-to-file (null package-status-alist)) (source (if (listp package-or-source) (or package-or-source (error "package-or-source cannot be nil")) (el-get-package-def package-or-source))) (package (el-get-as-symbol (el-get-source-name source))) (cached-recipe (or (el-get-read-package-status-recipe package package-status-alist) (error "Could not retrieve cached recipe for package %s" package)))) (if (el-get-package-is-installed package) nil (error "Package %s is not installed. Cannot update recipe." package)) (progn (let* ((--cl-rest-- (el-get-diagnosis-properties cached-recipe source)) (update-p (if (= (length --cl-rest--) 3) (car (prog1 --cl-rest-- ...)) (signal (quote wrong-number-of-arguments) (list nil ...)))) (added-disallowed (car (prog1 --cl-rest-- (setq --cl-rest-- ...)))) (removed-disallowed (car --cl-rest--))) (if (or added-disallowed removed-disallowed) (progn (funcall (if noerror (quote el-get-verbose-message) (quote error)) "Tried to add non-whitelisted properties:\n\n%s\n\nand remove non-whitelisted properties:\n\n%s\n\ninto/from source:\n\n%s\nMaybe you should use `el-get-update' or `el-get-reinstall' on %s instead?" (if added-disallowed (pp-to-string added-disallowed) "()") (if removed-disallowed (pp-to-string removed-disallowed) "()") (pp-to-string cached-recipe) (el-get-source-name cached-recipe)) (throw (quote --cl-block-el-get-merge-properties-into-status--) nil))) (if update-p (progn (if save-to-file (el-get-save-package-status package "installed" source) (plist-put (cdr ...) (quote recipe) source)))))))
  (catch (quote --cl-block-el-get-merge-properties-into-status--) (let* ((save-to-file (null package-status-alist)) (source (if (listp package-or-source) (or package-or-source (error "package-or-source cannot be nil")) (el-get-package-def package-or-source))) (package (el-get-as-symbol (el-get-source-name source))) (cached-recipe (or (el-get-read-package-status-recipe package package-status-alist) (error "Could not retrieve cached recipe for package %s" package)))) (if (el-get-package-is-installed package) nil (error "Package %s is not installed. Cannot update recipe." package)) (progn (let* ((--cl-rest-- (el-get-diagnosis-properties cached-recipe source)) (update-p (if (= ... 3) (car ...) (signal ... ...))) (added-disallowed (car (prog1 --cl-rest-- ...))) (removed-disallowed (car --cl-rest--))) (if (or added-disallowed removed-disallowed) (progn (funcall (if noerror ... ...) "Tried to add non-whitelisted properties:\n\n%s\n\nand remove non-whitelisted properties:\n\n%s\n\ninto/from source:\n\n%s\nMaybe you should use `el-get-update' or `el-get-reinstall' on %s instead?" (if added-disallowed ... "()") (if removed-disallowed ... "()") (pp-to-string cached-recipe) (el-get-source-name cached-recipe)) (throw (quote --cl-block-el-get-merge-properties-into-status--) nil))) (if update-p (progn (if save-to-file (el-get-save-package-status package "installed" source) (plist-put ... ... source))))))))
  (let* ((noerror (car (cdr (memq (quote :noerror) --cl-rest--))))) (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) (quote (:noerror :allow-other-keys))) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ... --cl-rest--))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:noerror)" (car --cl-keys--)))))) (catch (quote --cl-block-el-get-merge-properties-into-status--) (let* ((save-to-file (null package-status-alist)) (source (if (listp package-or-source) (or package-or-source (error "package-or-source cannot be nil")) (el-get-package-def package-or-source))) (package (el-get-as-symbol (el-get-source-name source))) (cached-recipe (or (el-get-read-package-status-recipe package package-status-alist) (error "Could not retrieve cached recipe for package %s" package)))) (if (el-get-package-is-installed package) nil (error "Package %s is not installed. Cannot update recipe." package)) (progn (let* ((--cl-rest-- (el-get-diagnosis-properties cached-recipe source)) (update-p (if ... ... ...)) (added-disallowed (car ...)) (removed-disallowed (car --cl-rest--))) (if (or added-disallowed removed-disallowed) (progn (funcall ... "Tried to add non-whitelisted properties:\n\n%s\n\nand remove non-whitelisted properties:\n\n%s\n\ninto/from source:\n\n%s\nMaybe you should use `el-get-update' or `el-get-reinstall' on %s instead?" ... ... ... ...) (throw ... nil))) (if update-p (progn (if save-to-file ... ...))))))))
  el-get-merge-properties-into-status(gnus nil :noerror t)
  (progn (el-get-merge-properties-into-status package package-status-alist :noerror t))
  (if el-get-auto-update-cached-recipes (progn (el-get-merge-properties-into-status package package-status-alist :noerror t)))
  el-get-do-init(gnus)
  (while (consp --cl-var--) (setq p (car --cl-var--)) (el-get-do-init p) (setq done (nconc done (list p))) (setq --cl-var-- (cdr --cl-var--)))
  (let* ((--cl-var-- init-deps) (p nil) (done nil)) (while (consp --cl-var--) (setq p (car --cl-var--)) (el-get-do-init p) (setq done (nconc done (list p))) (setq --cl-var-- (cdr --cl-var--))) nil)
  (progn (let* ((--cl-var-- init-deps) (p nil) (done nil)) (while (consp --cl-var--) (setq p (car --cl-var--)) (el-get-do-init p) (setq done (nconc done (list p))) (setq --cl-var-- (cdr --cl-var--))) nil))
  (let* ((p-s-alist (el-get-read-status-file)) (required (el-get-filter-package-alist-with-status p-s-alist "required")) (installed (el-get-filter-package-alist-with-status p-s-alist "installed")) (to-init (if packages (progn (let* ((--cl-var-- packages) (p nil) (--cl-var-- nil)) (while (consp --cl-var--) (setq p ...) (if ... ...) (setq --cl-var-- ...)) (nreverse --cl-var--))) (mapcar (quote el-get-as-symbol) installed))) (init-deps (el-get-dependencies to-init)) (to-install (if packages (progn (let* ((--cl-var-- packages) (p nil) (--cl-var-- nil)) (while (consp --cl-var--) (setq p ...) (if ... ... ...) (setq --cl-var-- ...)) (nreverse --cl-var--))) (mapcar (quote el-get-as-symbol) required))) (install-deps (el-get-dependencies to-install)) done) (el-get-verbose-message "el-get-init-and-install: install %S" install-deps) (el-get-verbose-message "el-get-init-and-install: init %S" init-deps) (progn (let* ((--cl-var-- install-deps) (p nil) (done nil)) (while (consp --cl-var--) (setq p (car --cl-var--)) (el-get-do-install p) (setq done (nconc done (list p))) (setq --cl-var-- (cdr --cl-var--))) nil)) (progn (let* ((--cl-var-- init-deps) (p nil) (done nil)) (while (consp --cl-var--) (setq p (car --cl-var--)) (el-get-do-init p) (setq done (nconc done (list p))) (setq --cl-var-- (cdr --cl-var--))) nil)) done)
  el-get-init-and-install(nil)
  (prog1 (el-get-init-and-install (mapcar (quote el-get-as-symbol) packages)) (el-get-eval-autoloads))
  (let* ((packages (progn (let* ((--cl-var-- packages) (p nil) (--cl-var-- nil)) (while (consp --cl-var--) (setq p (car --cl-var--)) (if (listp p) (progn ...) (setq --cl-var-- ...)) (setq --cl-var-- (cdr --cl-var--))) (nreverse --cl-var--)))) (total (length packages)) (installed (el-get-count-packages-with-status packages "installed")) (el-get-default-process-sync sync)) (prog1 (el-get-init-and-install (mapcar (quote el-get-as-symbol) packages)) (el-get-eval-autoloads)))
  el-get(sync)
  eval-buffer(#<buffer  *load*-353418> nil "/Users/dave/.emacs.d/el-get/elhome/startup/10-el-get.el" nil t)  ; Reading at buffer position 406
  load-with-code-conversion("/Users/dave/.emacs.d/el-get/elhome/startup/10-el-get.el" "/Users/dave/.emacs.d/el-get/elhome/startup/10-el-get.el" nil nil)
  load("/Users/dave/.emacs.d/el-get/elhome/startup/10-el-get" nil nil nil nil)
  elhome-load("/Users/dave/.emacs.d/el-get/elhome/startup/10-el-get")
  (lambda (file) (elhome-load file))("/Users/dave/.emacs.d/el-get/elhome/startup/10-el-get")
  mapc((lambda (file) (elhome-load file)) ("/Users/dave/.emacs.d/el-get/elhome/startup/00-me-minor-mode" "/Users/dave/.emacs.d/el-get/dwamacs/startup/01-global-keybindings" "/Users/dave/.emacs.d/el-get/elhome/startup/05-after-load" "/Users/dave/.emacs.d/el-get/dwamacs/startup/09-el-get" "/Users/dave/.emacs.d/el-get/elhome/startup/10-el-get" "/Users/dave/.emacs.d/el-get/dwamacs/startup/10-passwd" "/Users/dave/.emacs.d/el-get/dwamacs/startup/20-envvars" "/Users/dave/.emacs.d/el-get/elhome/startup/20-initsplit" "/Users/dave/.emacs.d/el-get/elhome/startup/30-elhome-settings" "/Users/dave/.emacs.d/el-get/dwamacs/startup/30-setups" "/Users/dave/.emacs.d/el-get/dwamacs/startup/99-sugar"))
  elhome-init()
  eval-buffer(#<buffer  *load*> nil "/Users/dave/.emacs.d/init.el" nil t)  ; Reading at buffer position 796
  load-with-code-conversion("/Users/dave/.emacs.d/init.el" "/Users/dave/.emacs.d/init.el" t t)
  load("/Users/dave/.emacs.d/init" t t)
  #[0 "�\205\262   \306=\203�\307�\310Q\202; \311=\204�\307�\312Q\202;\313\307\314\315#\203*\316\202;\313\307\314\317#\203:\320\nB�\321\202;\316\322�\323�\322\211#\210�\322=\203a\324\325\326\307�\327Q!\"\323�\322\211#\210�\322=\203`��\210�\203\243\330�!\331\232\203\243\332�!\211\333P\334�!\203}\211\202\210\334�!\203\207�\202\210\314\262��\203\241\335��\"\203\237\336\337��#\210\340\341!\210��\266�\f?\205\260\314�\323\342\322\211#)\262�\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' init file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()
  command-line()
  normal-top-level()
@dimitri
Owner
dimitri commented Feb 24, 2013

It's not a cache in that meaning of the term, it's a copy of the recipe as it were at the time when you installed the package. By definition when merging-in the new recipe definition, we have no other source where to find the recipe for the package as when you did install it the first time. As some upgrades are not compatible (switch from csv to git for example) we can not ignore the problem.

Another bug report that I don't know what do to with in the time I can allocate to it. Will try and see about it later, but without further information I doubt this bug report is useful enough to decide for anything.

@DarwinAwardWinner
Collaborator

Yes, I suppose I deserve the blame for calling it a cache when it's really not. I'm not exactly sure what the right term is. "Snapshot store"?

In any case, for every package that is installed, a recipe is supposed to be stored in the cache-that's-not-really-a-cache. This is because even if the recipe is later updated (or removed), the already-installed package needs to keep using the old recipe. In theory, it shouldn't be possible to have an installed package with a missing recipe snapshot. So, since this case should "never" happen, I guess we can do whatever we want when it happens. Currently we throw an error, which helps with debugging, but I would be in favor of changing that to a warning followed by using the latest available version of the recipe, on the possibility that it happens to have not changed.

Any objections?

@dimitri
Owner
dimitri commented Mar 1, 2013

Chances are that we will just fail later with an error that's harder to understand. It could be that the problem here is in the status reading functions that should transform the status file from the old to the new format and do exactly what you're saying then. Want to see about that?

@dabrahams, do you care enough to share your status file content?

@dabrahams
@DarwinAwardWinner
Collaborator

We should probably change the error message to include the status entry for the offending package, as well as a recommendation for the user to remove and reinstall it, and we should make sure that packages can be removed without needing their recipes available (I believe this is the case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.