GNU bug report logs - #10593
24.0.92; package.el doesn't initialize dependencies when installing

Previous Next

Package: emacs;

Reported by: Donald Ephraim Curtis <dcurtis <at> milkbox.net>

Date: Tue, 24 Jan 2012 07:46:02 UTC

Severity: normal

Found in version 24.0.92

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Donald Ephraim Curtis <dcurtis <at> coe.edu>
To: Donald Ephraim Curtis <dcurtis <at> milkbox.net>,
 bug-gnu-emacs <at> gnu.org
Subject: bug#10593: 24.0.92;
	package.el doesn't initialize dependencies when installing
Date: Tue, 24 Jan 2012 13:42:37 -0600
I have fixed my problems with advice,  hopefully this can help with a patch to package.el,

(defadvice package-download-tar (after package-download-tar-initialize activate compile)
  "initialize the package after compilation"
  (package-initialize))

(defadvice package-download-single (after package-download-single-initialize activate compile)
  "initialize the package after compilation"
  (package-initialize))


(defadvice package-compute-transaction (before
                                        package-compute-transaction-reverse (package-list requirements)
                                        activate compile)
  "reverse the requirements"
  (setq requirements (reverse requirements)))


The first two just make sure that packages get initialized after they get installed.  However, this was not enough.  It turns out package A has,

;; Package-Requires: ((ruby-mode "1.1") (inf-ruby "2.2.1") (ruby-compilation "0.8") (jump "2.0"))

ruby-compilation requires ruby-mode and inf-ruby, 

;; Package-Requires: ((ruby-mode "1.1") (inf-ruby "2.2.1"))


However, when I'd actually install the first package, it would first install "jump", then install "ruby-compilation" -- which would fail to compile because "inf-ruby" and "ruby-mode" weren't installed.  So the third set of advice was just to make sure that the requirements are installed in the proper order (which is reverse of what they are generated.

This is not necessarily ideal.  It seems like somehow there needs to be some proper ordering done by package.el, but I haven't had time or knowledge to try to get this working.  I thought I would send this to bugs first.



This bug report was last modified 13 years and 121 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.