GNU bug report logs - #6805
24.0.50; package--dir assumes that Emacs is installed

Previous Next

Package: emacs;

Reported by: Ævar Arnfjörð Bjarmason <avarab <at> gmail.com>

Date: Thu, 5 Aug 2010 20:09:02 UTC

Severity: normal

Found in version 24.0.50

Done: Chong Yidong <cyd <at> stupidchicken.com>

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 6805 in the body.
You can then email your comments to 6805 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6805; Package emacs. (Thu, 05 Aug 2010 20:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ævar Arnfjörð Bjarmason <avarab <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 05 Aug 2010 20:09:02 GMT) Full text and rfc822 format available.

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

From: Ævar Arnfjörð Bjarmason <avarab <at> gmail.com>
To: Emacs is full of bugs <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.50; package--dir assumes that Emacs is installed
Date: Thu, 5 Aug 2010 18:07:39 +0000
When I compile Emacs from Git and run it without doing "make install" I
run into this in package.el:

    (unless pkg-dir
      (error "Internal error: could not find directory for %s-%s"
	     name version-str))

It's failing that assertion because package--dir assumes that Emacs is
already installed:

    package-directory-list is a variable defined in `package.el'.
    Its value is
    ("/usr/local/share/emacs/24.0.50/site-lisp/elpa"
"/usr/local/share/emacs/site-lisp/elpa")

It shouldn't do that. Usually Emacs runs fine if you build it and don't
install it.

In GNU Emacs 24.0.50.2 (i686-unknown-kfreebsd7.3-gnu, GTK+ Version 2.20.1)
 of 2010-08-05 on k
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
configured using `configure  'CFLAGS=-O0 -ggdb3''

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: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  eldoc-mode: t
  icomplete-mode: t
  iswitchb-mode: t
  show-paren-mode: t
  mouse-wheel-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
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-x b M <return> M-< C-h f p a c k a g <tab> a c <tab>
- 1 <tab> <return> C-x o <tab> <return> C-x 1 C-n C-n
C-n C-n C-n C-x b <return> C-x k C-x b <return> C-x
b <return> C-p C-p C-e M-b M-b M-b M-b M-b C-b C-SPC
C-e C-b C-b M-w C-x b * <backspace> s c r <return>
C-y C-a a M-f C-/ C-e M-b M-b M-b " M-d p a c k a g
e " C-x b M <return> C-x b <return> C-f C-k " 1 ' <backspace>
. 0 " ) C-x C-e C-x b <return> C-x k C-x b <return>
M-< C-s p a c k a g e - - d i r C-n C-n M-f M-f M-f
M-f C-f C-f C-h v <return> M-b M-b C-h v <return> C-x
1 C-h v <return> C-x o C-x o C-e M-b M-b C-h v <return>
C-x 1 M-x r e p o <tab> o <tab> <backspace> r t <tab>
<return> p a c k a g e - - d i r SPC s a s <backspace>
<backspace> <backspace> a s s u m e s SPC t h a t SPC
E m a c s SPC i s SPC i n s t a l l e d <return> C-p
C-p C-p C-p C-p M-f M-f a b C-f M-d g m a i l C-c C-s
n C-g C-x k <return> n C-x b b <backspace> b <return>
C-x b m a i <return> C-x k y C-n M-x r e p o <tab>
r <tab> <return>

Recent messages:
Checking 87 files in /home/avar/g/emacs/lisp/calc...
Checking 43 files in /home/avar/g/emacs/lisp/obsolete...
Checking for load-path shadows...done
Convert non-ASCII letters to hexadecimal? (y or n)
Send this bug report to the Emacs maintainers? (y or n)
Quit
Buffer *mail to bug-gnu-emacs <at> gnu.org* modified; kill anyway? (y or n)
Please answer y or n.  Buffer *mail to bug-gnu-emacs <at> gnu.org*
modified; kill anyway? (y or n)
Buffer *mail to bug-gnu-emacs <at> gnu.org* modified; kill anyway? (y or n)
Making completion list...

Load-path shadows:
/home/avar/g/elisp/nopaste/nopaste hides /home/avar/g/elisp/_local/nopaste
/home/avar/g/elisp/shellarchive/find-cmd hides /home/avar/g/emacs/lisp/find-cmd
/home/avar/g/elisp/css-mode hides /home/avar/g/emacs/lisp/textmodes/css-mode
/home/avar/g/elisp/cperl-mode/cperl-mode hides
/home/avar/g/emacs/lisp/progmodes/cperl-mode

Features:
(shadow sort gnus-util mail-extr message sendmail rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug pp multi-isearch vc-git eldoc find-func help-mode easymenu view
package edit-server derived server slime-autoloads easy-mmode cc-styles
cc-align cc-engine cc-vars cc-defs regexp-opt byte-opt warnings bytecomp
byte-compile advice help-fns advice-preload edmacro kmacro icomplete
iswitchb paren tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win
x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind dynamic-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6805; Package emacs. (Sun, 08 Aug 2010 20:34:02 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Ævar Arnfjörð Bjarmason <avarab <at> gmail.com>
Cc: 6805 <at> debbugs.gnu.org
Subject: Re: bug#6805: 24.0.50; package--dir assumes that Emacs is installed
Date: Sun, 08 Aug 2010 16:33:57 -0400
Ævar Arnfjörð Bjarmason <avarab <at> gmail.com> writes:

> When I compile Emacs from Git and run it without doing "make install" I
> run into this in package.el:
>
>     (unless pkg-dir
>       (error "Internal error: could not find directory for %s-%s"
> 	     name version-str))

I can't reproduce this.  I run Emacs in place without `make install',
and have not encountered any such error.  Could you provide a precise
description of the error, such as the error message shown in echo area?

> It's failing that assertion because package--dir assumes that Emacs is
> already installed:
>
>     package-directory-list is a variable defined in `package.el'.
>     Its value is
>     ("/usr/local/share/emacs/24.0.50/site-lisp/elpa"
> "/usr/local/share/emacs/site-lisp/elpa")

It should not matter if these directories do not exist, but your bug
report does not provide enough information to tell for sure.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6805; Package emacs. (Sun, 08 Aug 2010 21:00:03 GMT) Full text and rfc822 format available.

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

From: Ævar Arnfjörð Bjarmason <avarab <at> gmail.com>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 6805 <at> debbugs.gnu.org
Subject: Re: bug#6805: 24.0.50; package--dir assumes that Emacs is installed
Date: Sun, 8 Aug 2010 20:55:15 +0000
On Sun, Aug 8, 2010 at 20:33, Chong Yidong <cyd <at> stupidchicken.com> wrote:
> Ævar Arnfjörð Bjarmason <avarab <at> gmail.com> writes:
>
>> When I compile Emacs from Git and run it without doing "make install" I
>> run into this in package.el:
>>
>>     (unless pkg-dir
>>       (error "Internal error: could not find directory for %s-%s"
>>            name version-str))
>
> I can't reproduce this.  I run Emacs in place without `make install',
> and have not encountered any such error.  Could you provide a precise
> description of the error, such as the error message shown in echo area?

On a fresh Emacs checkout from git://repo.or.cz/emacs.git on both
Debian GNU/Linux testing and Debian GNU/kFreeBSD unstable doing:

    mkdir ~/g
    git clone git://repo.or.cz/emacs.git &&
    cd emacs &&
    make -j 10 bootstrap &&
    make

followed by:

    src/emacs

will display, in the echo area:

    "Internal error: could not find directory for package-1.0"

And in *Messages*:

    package-activate-1: Internal error: could not find directory for package-1.0

>> It's failing that assertion because package--dir assumes that Emacs is
>> already installed:
>>
>>     package-directory-list is a variable defined in `package.el'.
>>     Its value is
>>     ("/usr/local/share/emacs/24.0.50/site-lisp/elpa"
>> "/usr/local/share/emacs/site-lisp/elpa")
>
> It should not matter if these directories do not exist, but your bug
> report does not provide enough information to tell for sure.

I've just glanced at the code, but it seems that it does
matter. package-activate-1 has this:

    (defun package-activate-1 (package pkg-vec)
      (let* ((name (symbol-name package))
             (version-str (package-version-join (package-desc-vers pkg-vec)))
             (pkg-dir (package--dir name version-str)))
        (unless pkg-dir
          (error "Internal error: could not find directory for %s-%s"
                 name version-str)

Which calls:

    (defun package--dir (name version-string)
      (let* ((subdir (concat name "-" version-string))
             (dir-list (cons package-user-dir package-directory-list)

package--dir is searching through (cons package-user-dir
package-directory-list), whose value on my system is:

    ("~/.emacs.d/elpa" "/usr/local/share/emacs/24.0.50/site-lisp/elpa"
"/usr/local/share/emacs/site-lisp/elpa")

None of those directories exist on my system. Perhaps you can
reproduce this issue if you delete your ~/.emacs.d/elpa directory?

Or maybe something is wrong on my system. I haven't looked deeply into
this bug, and I'd be happy to supply further info needed to solve it.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6805; Package emacs. (Sun, 08 Aug 2010 22:02:01 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Ævar Arnfjörð Bjarmason <avarab <at> gmail.com>
Cc: 6805 <at> debbugs.gnu.org
Subject: Re: bug#6805: 24.0.50; package--dir assumes that Emacs is installed
Date: Sun, 08 Aug 2010 18:02:05 -0400
Ævar Arnfjörð Bjarmason <avarab <at> gmail.com> writes:

> On a fresh Emacs checkout from git://repo.or.cz/emacs.git on both
> Debian GNU/Linux testing and Debian GNU/kFreeBSD unstable doing:
>
>     mkdir ~/g
>     git clone git://repo.or.cz/emacs.git &&
>     cd emacs &&
>     make -j 10 bootstrap &&
>     make
>
> followed by:
>
>     src/emacs
>
> will display, in the echo area:
>
>     "Internal error: could not find directory for package-1.0"

I don't see any error message with the Bzr repository; I don't know
about the unofficial git repository you are using.  You could try with
an empty .emacs file and no .emacs.d directory.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6805; Package emacs. (Sun, 08 Aug 2010 22:57:01 GMT) Full text and rfc822 format available.

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

From: Ævar Arnfjörð Bjarmason <avarab <at> gmail.com>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 6805 <at> debbugs.gnu.org
Subject: Re: bug#6805: 24.0.50; package--dir assumes that Emacs is installed
Date: Sun, 8 Aug 2010 22:49:32 +0000
On Sun, Aug 8, 2010 at 22:02, Chong Yidong <cyd <at> stupidchicken.com> wrote:
> Ævar Arnfjörð Bjarmason <avarab <at> gmail.com> writes:
>
>> On a fresh Emacs checkout from git://repo.or.cz/emacs.git on both
>> Debian GNU/Linux testing and Debian GNU/kFreeBSD unstable doing:
>>
>>     mkdir ~/g
>>     git clone git://repo.or.cz/emacs.git &&
>>     cd emacs &&
>>     make -j 10 bootstrap &&
>>     make
>>
>> followed by:
>>
>>     src/emacs
>>
>> will display, in the echo area:
>>
>>     "Internal error: could not find directory for package-1.0"
>
> I don't see any error message with the Bzr repository; I don't know
> about the unofficial git repository you are using.  You could try with
> an empty .emacs file and no .emacs.d directory.

I should have tried with -Q, it turns out that I had this in my ~/.emacs:

    (setq package-activated-list nil)

I was defining it because a package I was using used it, but I hadn't
tried my ~/.emacs on Emacs trunk, so it wasn't compatible with a Emacs
that has package.el built-in.

Sorry about the noise. I think this bug can be closed.




bug closed, send any further explanations to Ævar Arnfjörð Bjarmason <avarab <at> gmail.com> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Sun, 08 Aug 2010 23:18:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 06 Sep 2010 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 342 days ago.

Previous Next


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