From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: 6805@debbugs.gnu.org
Subject: bug#6805: 24.0.50; package--dir assumes that Emacs is installed
Date: Sun, 8 Aug 2010 20:55:15 +0000 [thread overview]
Message-ID: <AANLkTi==9j0f3jyscjn90OsULM5uJx3y3J+9s8fqkkV1@mail.gmail.com> (raw)
In-Reply-To: <87sk2ovo7e.fsf@stupidchicken.com>
On Sun, Aug 8, 2010 at 20:33, Chong Yidong <cyd@stupidchicken.com> wrote:
> Ævar Arnfjörð Bjarmason <avarab@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.
next prev parent reply other threads:[~2010-08-08 20:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-05 18:07 bug#6805: 24.0.50; package--dir assumes that Emacs is installed Ævar Arnfjörð Bjarmason
2010-08-08 20:33 ` Chong Yidong
2010-08-08 20:55 ` Ævar Arnfjörð Bjarmason [this message]
2010-08-08 22:02 ` Chong Yidong
2010-08-08 22:49 ` Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi==9j0f3jyscjn90OsULM5uJx3y3J+9s8fqkkV1@mail.gmail.com' \
--to=avarab@gmail.com \
--cc=6805@debbugs.gnu.org \
--cc=cyd@stupidchicken.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).