GNU bug report logs -
#14082
24.3; Package dependences calculated in reverse
Previous Next
Reported by: Donald Curtis <dcurtis <at> coe.edu>
Date: Thu, 28 Mar 2013 20:43:02 UTC
Severity: normal
Found in version 24.3
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14082 in the body.
You can then email your comments to 14082 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14082
; Package
emacs
.
(Thu, 28 Mar 2013 20:43:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Donald Curtis <dcurtis <at> coe.edu>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 28 Mar 2013 20:43:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
When `package.el' calculates package dependencies, they are installed in
the incorrect order.
Consider the rinari third-party package,
* rinari requires: ruby-mode, inf-ruby, ruby-compilation, jump
* jump requires: findr, inflections
* ruby-compilation requires: inf-ruby
Yet, the order of compilation appears to be:
1. inflections
2. findr
3. jump
4. ruby-compilation *fails missing inf-ruby*
5. inf-ruby
6. rinary *fails missing ruby-compilation*
It seems to be that the `jump' dependency of `rinari' is being installed
first, and even it's dependencies are being installed in a reverse
order.
The way that I have personally fixed this problem was to add advice to
the `package-compute-transaction' function:
(defadvice package-compute-transaction
(before
package-compute-transaction-reverse (package-list requirements)
activate compile)
"reverse the requirements"
(setq requirements (reverse requirements))
(print requirements))
It seems like there must be something in the way the requirements is
being built that means that when they are read they are done in reverse
order.
In GNU Emacs 24.3.1 (x86_64-apple-darwin12.3.0, NS apple-appkit-1187.37)
of 2013-03-28 on hendrix.local
Windowing system distributor `Apple', version 10.3.1187
Configured using:
`configure '--prefix=/usr/local/Cellar/emacs/24.3' '--without-dbus'
'--enable-locallisppath=/usr/local/share/emacs/site-lisp'
'--infodir=/usr/local/Cellar/emacs/24.3/share/info/emacs' '--with-ns'
'--disable-ns-self-contained' 'CC=cc''
Important settings:
locale-coding-system: utf-8
default enable-multibyte-characters: t
Major mode: Info
Minor modes in effect:
which-function-mode: t
ido-everywhere: t
delete-selection-mode: t
global-subword-mode: t
subword-mode: t
winner-mode: t
show-paren-mode: t
savehist-mode: t
shell-dirtrack-mode: t
global-auto-revert-mode: t
recentf-mode: t
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
C-x RET p a c k <tab> l i <tab> <return> C-s r i n
a r C-a i x y C-x b C-g C-x RET b u g <tab> <tab> C-w
C-w C-w c r e s u b C-g C-s s m e x C-a i x y C-x RET
b u g C-n C-n C-n C-n C-n C-n C-n C-n <return> C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n <tab> <S-tab> <return>
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n <left> C-b
<S-tab> <S-tab> <S-tab> <tab> <tab> C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p <tab> C-p C-n C-n C-n C-n C-p
C-p C-p C-p C-p M-f M-f M-f M-f M-f M-[ ESC ESC ESC
ESC C-g C-g C-x b b u g <backspace> <backspace> <backspace>
C-g C-x RET e m a c s b u g C-n <return> P a c k a
g e SPC D e p e n d e n c e s SPC C a l c u l a t e
d SPC i n SPC R e v e r s e <return> C-p C-n C-w h
e <backspace> <backspace> W h e n C-w C-w C-/ C-/ C-/
C-/ C-/ C-/ C-/ C-/ C-? C-? C-? C-c k C-x RET <ret
urn>
Recent messages:
Checking 70 files in /usr/local/Cellar/emacs/24.3/share/emacs/24.3/lisp/erc...
Checking 48 files in /usr/local/Cellar/emacs/24.3/share/emacs/24.3/lisp/emulation...
Checking 147 files in /usr/local/Cellar/emacs/24.3/share/emacs/24.3/lisp/emacs-lisp...
Checking 24 files in /usr/local/Cellar/emacs/24.3/share/emacs/24.3/lisp/cedet...
Checking 57 files in /usr/local/Cellar/emacs/24.3/share/emacs/24.3/lisp/calendar...
Checking 87 files in /usr/local/Cellar/emacs/24.3/share/emacs/24.3/lisp/calc...
Checking 77 files in /usr/local/Cellar/emacs/24.3/share/emacs/24.3/lisp/obsolete...
Checking 1 files in /usr/local/Cellar/emacs/24.3/share/emacs/24.3/leim...
Checking for load-path shadows...done
Undo! [8 times]
Load-path shadows:
~/.emacs.d/custom hides /usr/local/Cellar/emacs/24.3/share/emacs/24.3/lisp/custom
Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail info smex
smex-autoloads rinari-autoloads easy-mmode inf-ruby ruby-mode
inf-ruby-autoloads ruby-compilation-autoloads inflections findr
jump-autoloads findr-autoloads compile inflections-autoloads autoload
misearch multi-isearch mule-util time-stamp vc-git mail-utils
network-stream starttls url-http tls mail-parse rfc2231 rfc2047 rfc2045
ietf-drums url-gw url-cache url-auth url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
url-parse url-vars mailcap finder-inf whitespace base16-ocean-theme
which-func imenu cus-start cus-load rx ido delsel subword winner paren
savehist tramp-cache tramp-sh tramp tramp-compat auth-source eieio
gnus-util mm-util mail-prsvr password-cache tramp-loaddefs shell
pcomplete comint ansi-color ring format-spec autorevert byte-opt
warnings bytecomp byte-compile cconv edmacro kmacro windmove server
defun uniquify advice help-fns advice-preload saveplace recentf
tree-widget wid-edit misc midnight checkdoc thingatpt help-mode easymenu
package cl-macs gv cl cl-lib time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment 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 macroexp 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)
Reply sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
You have taken responsibility.
(Thu, 04 Apr 2013 02:51:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Donald Curtis <dcurtis <at> coe.edu>
:
bug acknowledged by developer.
(Thu, 04 Apr 2013 02:51:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 14082-done <at> debbugs.gnu.org (full text, mbox):
> * rinari requires: ruby-mode, inf-ruby, ruby-compilation, jump
> * jump requires: findr, inflections
> * ruby-compilation requires: inf-ruby
> Yet, the order of compilation appears to be:
> 1. inflections
> 2. findr
> 3. jump
> 4. ruby-compilation *fails missing inf-ruby*
Indeed, thanks. I installed the patch below which should fix
this problem. Note that a better fix would be to first download packages,
the unpack packages, then autoload packages, then compile packages.
This way, ordering won't matter (including circular dependencies).
Stefan
=== modified file 'lisp/emacs-lisp/package.el'
--- lisp/emacs-lisp/package.el 2013-04-04 01:51:33 +0000
+++ lisp/emacs-lisp/package.el 2013-04-04 02:42:31 +0000
@@ -811,7 +811,10 @@
(package-version-join (package-desc-vers (cdr pkg-desc)))))
;; Only add to the transaction if we don't already have it.
(unless (memq next-pkg package-list)
- (push next-pkg package-list))
+ (setq package-list
+ ;; Move to front, so it gets installed early enough
+ ;; (bug#14082).
+ (cons next-pkg (delq next-pkg package-list))))
(setq package-list
(package-compute-transaction package-list
(package-desc-reqs
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14082
; Package
emacs
.
(Fri, 05 Apr 2013 15:31:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 14082-done <at> debbugs.gnu.org (full text, mbox):
It appears the bug is still happening because if the package already exists then the new code will not get called because it is wrapped in the `unless'. The following patch works perfectly for me. It just always adds the package to the front.
diff --git a/package.el.orig b/package.el
index ab17ec1..064e1db 100644
--- a/package.el.orig
+++ b/package.el
@@ -810,11 +810,10 @@ but version %s required"
(symbol-name next-pkg) (package-version-join next-version)
(package-version-join (package-desc-vers (cdr pkg-desc)))))
;; Only add to the transaction if we don't already have it.
- (unless (memq next-pkg package-list)
- (setq package-list
- ;; Move to front, so it gets installed early enough
- ;; (bug#14082).
- (cons next-pkg (delq next-pkg package-list))))
+ (setq package-list
+ ;; Move to front, so it gets installed early enough
+ ;; (bug#14082).
+ (cons next-pkg (delq next-pkg package-list)))
(setq package-list
(package-compute-transaction package-list
(package-desc-reqs
Donald
On Apr 3, 2013, at 21:46, Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:
>> * rinari requires: ruby-mode, inf-ruby, ruby-compilation, jump
>> * jump requires: findr, inflections
>> * ruby-compilation requires: inf-ruby
>
>> Yet, the order of compilation appears to be:
>
>> 1. inflections
>> 2. findr
>> 3. jump
>> 4. ruby-compilation *fails missing inf-ruby*
>
> Indeed, thanks. I installed the patch below which should fix
> this problem. Note that a better fix would be to first download packages,
> the unpack packages, then autoload packages, then compile packages.
> This way, ordering won't matter (including circular dependencies).
>
>
> Stefan
>
>
> === modified file 'lisp/emacs-lisp/package.el'
> --- lisp/emacs-lisp/package.el 2013-04-04 01:51:33 +0000
> +++ lisp/emacs-lisp/package.el 2013-04-04 02:42:31 +0000
> @@ -811,7 +811,10 @@
> (package-version-join (package-desc-vers (cdr pkg-desc)))))
> ;; Only add to the transaction if we don't already have it.
> (unless (memq next-pkg package-list)
> - (push next-pkg package-list))
> + (setq package-list
> + ;; Move to front, so it gets installed early enough
> + ;; (bug#14082).
> + (cons next-pkg (delq next-pkg package-list))))
> (setq package-list
> (package-compute-transaction package-list
> (package-desc-reqs
>
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14082
; Package
emacs
.
(Fri, 05 Apr 2013 18:53:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 14082-done <at> debbugs.gnu.org (full text, mbox):
> - (unless (memq next-pkg package-list)
> - (setq package-list
> - ;; Move to front, so it gets installed early enough
> - ;; (bug#14082).
> - (cons next-pkg (delq next-pkg package-list))))
> + (setq package-list
> + ;; Move to front, so it gets installed early enough
> + ;; (bug#14082).
> + (cons next-pkg (delq next-pkg package-list)))
Duh! Of course, you're right, sorry about that.
Should be fixed now,
Stefan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 04 May 2013 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 52 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.