From unknown Mon Jun 23 05:59:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10593: 24.0.92; package.el doesn't initialize dependencies when installing Resent-From: Donald Ephraim Curtis Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Jan 2012 07:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10593 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 10593@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.132739111029715 (code B ref -1); Tue, 24 Jan 2012 07:46:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Jan 2012 07:45:10 +0000 Received: from localhost ([127.0.0.1]:41302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpb41-0007jD-5Y for submit@debbugs.gnu.org; Tue, 24 Jan 2012 02:45:10 -0500 Received: from eggs.gnu.org ([140.186.70.92]:38027) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpaw4-0007Ux-4K for submit@debbugs.gnu.org; Tue, 24 Jan 2012 02:36:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpavZ-0008QP-U5 for submit@debbugs.gnu.org; Tue, 24 Jan 2012 02:36:31 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_FRT_PACKAGE autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:40578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpavZ-0008QI-SM for submit@debbugs.gnu.org; Tue, 24 Jan 2012 02:36:25 -0500 Received: from eggs.gnu.org ([140.186.70.92]:39722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpavT-00023o-V4 for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2012 02:36:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpavL-0008PZ-GK for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2012 02:36:19 -0500 Received: from mail6.webfaction.com ([74.55.86.74]:55574 helo=smtp.webfaction.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpavL-0008PS-8x for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2012 02:36:11 -0500 Received: from [192.168.1.100] (173-28-195-157.client.mchsi.com [173.28.195.157]) by smtp.webfaction.com (Postfix) with ESMTP id 3D54026EC2D0 for ; Tue, 24 Jan 2012 01:36:09 -0600 (CST) From: Donald Ephraim Curtis Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Tue, 24 Jan 2012 01:36:08 -0600 Message-Id: <5C018434-EC33-4B98-B76A-08B53C677EEC@milkbox.net> Mime-Version: 1.0 (Apple Message framework v1251.1) X-Mailer: Apple Mail (2.1251.1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.2 (----) X-Mailman-Approved-At: Tue, 24 Jan 2012 02:45:08 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) I am attempting to install the package "clojurescript-mode" which depends on "clojure-mode" using package.el. clojurescript-mode properly cites clojure-mode as a dependency and in the source does a (require 'clojure-mode). However, inside `package-download-transaction' there is never a call to `package-initialize' or any other function to actually add the newly installed `clojure-mode' to the load-path. It ends up in this case that everything turns out fine, but there are other cases where multiple levels of dependencies exist and a simple (require '...) causes breakage. I am able to reproduce this with the `rinari' package that installs from packages in Marmalade and Tromey's repository. Compiling no file at Tue Jan 24 01:34:58 2012 Leaving directory `/Users/dcurtis/.emacs.d/elpa/rinari-2.3' Compiling file /Users/dcurtis/.emacs.d/elpa/rinari-2.3/rinari-pkg.el at = Tue Jan 24 01:34:58 2012 Entering directory `/Users/dcurtis/.emacs.d/elpa/rinari-2.3/' Compiling file /Users/dcurtis/.emacs.d/elpa/rinari-2.3/rinari.el at Tue = Jan 24 01:34:58 2012 rinari.el:80:1:Error: Cannot open load file: inf-ruby The packages continue to install, that's not a problem, but they don't = get compiled, total 104 -rw-r--r-- 1 dcurtis staff 1077 Jan 24 01:34 rinari-autoloads.el -rw-r--r-- 1 dcurtis staff 259 Jan 24 01:34 rinari-autoloads.el~ -rw-r--r-- 1 dcurtis staff 145 Jan 24 01:34 rinari-pkg.el -rw-r--r-- 1 dcurtis staff 665 Jan 24 01:34 rinari-pkg.elc -rw-r--r-- 1 dcurtis staff 35503 Jan 24 01:34 rinari.el If this is a bug in the packages, I'd be happy to trace it down, but changing `package-download-transaction' as follows fixed my problem; note the (package-initialize) at the bottom... (defun package-download-transaction (package-list) "Download and install all the packages in PACKAGE-LIST. PACKAGE-LIST should be a list of package names (symbols). This function assumes that all package requirements in PACKAGE-LIST are satisfied, i.e. that PACKAGE-LIST is computed using `package-compute-transaction'." (dolist (elt package-list) (let* ((desc (cdr (assq elt package-archive-contents))) ;; As an exception, if package is "held" in ;; `package-load-list', download the held version. (hold (cadr (assq elt package-load-list))) (v-string (or (and (stringp hold) hold) (package-version-join (package-desc-vers = desc)))) (kind (package-desc-kind desc))) (cond ((eq kind 'tar) (package-download-tar elt v-string)) ((eq kind 'single) (package-download-single elt v-string (package-desc-doc desc) (package-desc-reqs desc))) (t (error "Unknown package kind: %s" (symbol-name kind))))) (package-initialize))) =20 In GNU Emacs 24.0.92.1 (i386-apple-darwin11.2.0, NS = apple-appkit-1138.23) of 2012-01-23 on bird.local Windowing system distributor `Apple', version 10.3.1138 configured using `configure '--prefix=3D/usr/local/Cellar/emacs/HEAD' = '--without-dbus' = '--enable-locallisppath=3D/usr/local/share/emacs/site-lisp' = '--infodir=3D/usr/local/Cellar/emacs/HEAD/share/info/emacs' '--with-ns' = '--disable-ns-self-contained' 'CC=3D/usr/bin/llvm-gcc' 'CFLAGS=3D-O3 -w = -pipe -march=3Dcore2 -msse4'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: paredit-mode: t hl-line-mode: t idle-highlight-mode: t whitespace-mode: t savehist-mode: t recentf-mode: t ido-ubiquitous: t ido-everywhere: t show-paren-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-: ( p a c k a g e - i n s t a l l SPC ' c l o j u=20 r e s c r i p t - m o d e ) C-n C-x RET r=20 e p o r t Recent messages: (No changes need to be saved) (No files need saving) Checking /Users/dcurtis/.emacs.d/elpa/clojurescript-mode-20120123... [2 = times] Compiling = /Users/dcurtis/.emacs.d/elpa/clojurescript-mode-20120123/clojurescript-mod= e-pkg.el...done Wrote = /Users/dcurtis/.emacs.d/elpa/clojurescript-mode-20120123/clojurescript-mod= e-pkg.elc Checking /Users/dcurtis/.emacs.d/elpa/clojurescript-mode-20120123... Compiling = /Users/dcurtis/.emacs.d/elpa/clojurescript-mode-20120123/clojurescript-mod= e.el... Checking /Users/dcurtis/.emacs.d/elpa/clojurescript-mode-20120123... Done (Total of 1 file compiled, 1 failed, 1 skipped) t byte-code: End of buffer Load-path shadows: ~/.emacs.d/custom hides = /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.92/lisp/custom /Users/dcurtis/.emacs.d/elpa/magit-20120122/.dir-locals hides = /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.92/lisp/gnus/.dir-locals Features: (shadow sort flyspell ispell mail-extr message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader emacsbug clojurescript-mode-autoloads clojure-mode-autoloads rx compile comint ring time-stamp vc-git regexp-opt autoload mail-utils url-cache network-stream starttls url-http tls mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw url-auth url url-proxy url-privacy url-expand url-methods url-history url-cookie url-util url-parse auth-source eieio assoc gnus-util password-cache url-vars mm-util mail-prsvr mailcap finder-inf paredit hl-line saveplace idle-highlight-mode thingatpt whitespace molokai-theme savehist recentf tree-widget wid-edit easymenu autorevert cua-base cus-start cus-load byte-opt warnings bytecomp byte-compile cconv macroexp server misc midnight starter-kit-bindings-autoloads windmove starter-kit-autoloads edmacro kmacro smex starter-kit-misc ffap ido-ubiquitous ido paren starter-kit-defuns uniquify advice help-fns advice-preload magit-autoloads ido-ubiquitous-autoloads smex-autoloads find-file-in-project-autoloads idle-highlight-mode-autoloads paredit-autoloads package tabulated-list defun cl time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) From unknown Mon Jun 23 05:59:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10593: 24.0.92; package.el doesn't initialize dependencies when installing References: <5C018434-EC33-4B98-B76A-08B53C677EEC@milkbox.net> In-Reply-To: <5C018434-EC33-4B98-B76A-08B53C677EEC@milkbox.net> Resent-From: Donald Ephraim Curtis Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Jan 2012 20:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10593 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: dcurtis@milkbox.net, 10593@debbugs.gnu.org X-Debbugs-Original-To: Donald Ephraim Curtis , bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.132743854911744 (code B ref -1); Tue, 24 Jan 2012 20:56:01 +0000 Received: (at submit) by debbugs.gnu.org; 24 Jan 2012 20:55:49 +0000 Received: from localhost ([127.0.0.1]:42145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RpnPA-00033L-1j for submit@debbugs.gnu.org; Tue, 24 Jan 2012 15:55:49 -0500 Received: from eggs.gnu.org ([140.186.70.92]:39756) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpn8w-0002eQ-EI for submit@debbugs.gnu.org; Tue, 24 Jan 2012 15:39:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rpn8R-0005hE-19 for submit@debbugs.gnu.org; Tue, 24 Jan 2012 15:38:34 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_XBL autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:38364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rpn8Q-0005Xe-Ug for submit@debbugs.gnu.org; Tue, 24 Jan 2012 15:38:30 -0500 Received: from eggs.gnu.org ([140.186.70.92]:40986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpmWw-0002kK-9G for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2012 15:00:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpmGS-0005pX-Td for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2012 14:42:46 -0500 Received: from mail-gx0-f169.google.com ([209.85.161.169]:35030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpmGS-0005pG-RB for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2012 14:42:44 -0500 Received: by ggnk5 with SMTP id k5so2482976ggn.0 for ; Tue, 24 Jan 2012 11:42:43 -0800 (PST) Received: by 10.101.119.9 with SMTP id w9mr6335049anm.24.1327434163553; Tue, 24 Jan 2012 11:42:43 -0800 (PST) Received: from [172.16.14.104] ([192.133.84.6]) by mx.google.com with ESMTPS id e48sm29086634yhm.12.2012.01.24.11.42.42 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Jan 2012 11:42:42 -0800 (PST) From: Donald Ephraim Curtis Date: Tue, 24 Jan 2012 13:42:37 -0600 Message-Id: Mime-Version: 1.0 (Apple Message framework v1251.1) X-Mailer: Apple Mail (2.1251.1) X-Gm-Message-State: ALoCoQnF0ZSkEwafsWXUr2+rl9wQsbjHZepD5oYwI2jcyHFVXwuYAqvtN7VYQ2HqZIJJ55fLQrJU Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.2 (----) X-Mailman-Approved-At: Tue, 24 Jan 2012 15:55:47 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) 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,=20 ;; 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.= From unknown Mon Jun 23 05:59:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10593: 24.0.92; package.el doesn't initialize dependencies when installing Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Jan 2012 08:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10593 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Donald Ephraim Curtis Cc: 10593@debbugs.gnu.org Received: via spool by 10593-submit@debbugs.gnu.org id=B10593.132773851815078 (code B ref 10593); Sat, 28 Jan 2012 08:16:02 +0000 Received: (at 10593) by debbugs.gnu.org; 28 Jan 2012 08:15:18 +0000 Received: from localhost ([127.0.0.1]:47447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rr3RN-0003v8-6e for submit@debbugs.gnu.org; Sat, 28 Jan 2012 03:15:17 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:41246 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rr3RL-0003uz-1z for 10593@debbugs.gnu.org; Sat, 28 Jan 2012 03:15:16 -0500 Received: from [155.69.16.246] (port=49715 helo=furball) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Rr3Qc-0005V1-Lk; Sat, 28 Jan 2012 03:14:31 -0500 From: Chong Yidong References: <5C018434-EC33-4B98-B76A-08B53C677EEC@milkbox.net> Date: Sat, 28 Jan 2012 16:14:23 +0800 In-Reply-To: <5C018434-EC33-4B98-B76A-08B53C677EEC@milkbox.net> (Donald Ephraim Curtis's message of "Tue, 24 Jan 2012 01:36:08 -0600") Message-ID: <87vcnw2qhs.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Donald Ephraim Curtis writes: > I am attempting to install the package "clojurescript-mode" which > depends on "clojure-mode" using package.el. clojurescript-mode properly > cites clojure-mode as a dependency and in the source does a (require > 'clojure-mode). However, inside `package-download-transaction' there is > never a call to `package-initialize' or any other function to actually > add the newly installed `clojure-mode' to the load-path. It ends up in > this case that everything turns out fine, but there are other cases > where multiple levels of dependencies exist and a simple (require '...) > causes breakage. I am able to reproduce this with the `rinari' package > that installs from packages in Marmalade and Tromey's repository. > > If this is a bug in the packages, I'd be happy to trace it down, but > changing `package-download-transaction' as follows fixed my problem Thanks for the bug report. I've committed a different fix to the version of package.el in the Emacs trunk. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 28 03:15:27 2012 Received: (at control) by debbugs.gnu.org; 28 Jan 2012 08:15:27 +0000 Received: from localhost ([127.0.0.1]:47450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rr3RX-0003vT-0B for submit@debbugs.gnu.org; Sat, 28 Jan 2012 03:15:27 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:41248 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rr3RV-0003vN-7Q for control@debbugs.gnu.org; Sat, 28 Jan 2012 03:15:25 -0500 Received: from [155.69.16.246] (port=49716 helo=furball) by fencepost.gnu.org with esmtpa (Exim 4.71) (envelope-from ) id 1Rr3Qo-0005VL-0R for control@debbugs.gnu.org; Sat, 28 Jan 2012 03:14:42 -0500 From: Chong Yidong To: control@debbugs.gnu.org Subject: close 10593 Date: Sat, 28 Jan 2012 16:14:38 +0800 Message-ID: <878vksqm4x.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) close 10593 thanks