unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23237: Strange behavior of `package` in automated install in init script
@ 2016-04-07  6:00 Alex Coventry
  2016-04-07 15:54 ` Michael Heerdegen
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Coventry @ 2016-04-07  6:00 UTC (permalink / raw)
  To: 23237

[-- Attachment #1: Type: text/plain, Size: 4785 bytes --]

This is a report of two bugs in a fresh install of emacs on the
ubuntu:14.04 docker image and the following elisp in install-package.el

  (require 'package)
  (add-to-list
   'package-archives
   '("melpa" . "http://melpa.org/packages/")
   t)
  (package-initialize)
  (package-refresh-contents)
  (message (format "package contents: %s" package-archive-contents))
  (package-install "evil")

The first bug is that both of the shell commands result in "not enough
arguments for format string".  Something is strange about the value of
package-archive-contents at that time.

  root@cecce30d6adf:/emacs# emacs -l install-package.el
  root@cecce30d6adf:/emacs# emacs -batch --eval '(setq user-init-file
"~/.emacs")' -l install-package.el

However, the (format) command works just fine when invoked interactively
after the install-package.el command has failed.

The second (original) bug is that both shell commands result in the
complaint `Package `evil-' is unavailable` if you comment out the (message)
sexp.

I would like to be able to use `package-install` in an automated way like
this in order to build docker containers for emacs.

The following docker file built the container I was testing in, and will be
available at alxempirical/emacs-git-master as soon as it's pushed.  (It's
on the order of a gig, though.)

Best regards,
Alex

FROM ubuntu:14.04
RUN apt-get update && apt-get upgrade -y
RUN apt-get build-dep -y emacs
RUN apt-get install -y git ncurses-dev autoconf automake
RUN git clone git://git.savannah.gnu.org/emacs.git
WORKDIR emacs
RUN ./autogen.sh
RUN ./autogen.sh git
RUN apt-get install -y texinfo
RUN ./configure
RUN make install
COPY install-package.el /


In GNU Emacs 25.1.50.1 (x86_64-unknown-linux-gnu)
 of 2016-04-07 built on f0726407848b
Repository revision: 1f6b0bc1512de08fd542df0234476788038c8c82
System Description: Ubuntu 14.04.4 LTS

Configured features:
SOUND NOTIFY

Important settings:
  locale-coding-system: nil

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-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
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:80 [2 times]
Contacting host: melpa.org:80
Package refresh done [2 times]
Saving file /root/.emacs...
Wrote /root/.emacs [2 times]
package-compute-transaction: Package ‘evil-’ is unavailable
Quit
Type C-x 1 to delete the help window.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug sendmail regexp-opt eieio-opt speedbar
sb-image ezimage image dframe find-func thingatpt help-fns cus-edit
cus-start cus-load wid-edit mm-archive message dired dired-loaddefs
format-spec rfc822 mml mml-sec epa derived gnus-util rmail tool-bar
rmail-loaddefs mailabbrev gmm-utils mailheader mm-decode mm-bodies
mm-encode mail-utils network-stream starttls url-http tls gnutls
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw
nsm puny seq url-cache url-auth url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap epg
term/xterm xterm time-date finder-inf package epg-config url-handlers
url-parse auth-source cl-seq eieio byte-opt bytecomp byte-compile
cl-extra help-mode easymenu cconv eieio-core cl-macs gv eieio-loaddefs
cl-loaddefs pcase cl-lib password-cache url-vars disp-table mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select mouse jit-lock font-lock syntax
facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote inotify multi-tty
make-network-process emacs)

Memory information:
((conses 16 180731 17858)
 (symbols 48 26964 2)
 (miscs 40 34 147)
 (strings 32 43773 19901)
 (string-bytes 1 1131962)
 (vectors 16 24838)
 (vector-slots 8 1238099 198624)
 (floats 8 237 346)
 (intervals 56 213 126)
 (buffers 976 12)
 (heap 1024 21727 2658))

[-- Attachment #2: Type: text/html, Size: 6374 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#23237: Strange behavior of `package` in automated install in init script
  2016-04-07  6:00 bug#23237: Strange behavior of `package` in automated install in init script Alex Coventry
@ 2016-04-07 15:54 ` Michael Heerdegen
       [not found]   ` <CAAC0Up8JaRkhC=8t5D+_4uCvR79M_1svPte5xGAhhVmKyyTzOA@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Heerdegen @ 2016-04-07 15:54 UTC (permalink / raw)
  To: Alex Coventry; +Cc: 23237

Alex Coventry <alx@empirical.com> writes:

>   (message (format "package contents: %s" package-archive-contents))

This should better be

  (message "package contents: %s" package-archive-contents)

>   (package-install "evil")

According to the doc of `package-install', package names are symbols, so
I think you should better do

  (package-install 'evil)


Michael.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#23237: Strange behavior of `package` in automated install in init script
       [not found]   ` <CAAC0Up8JaRkhC=8t5D+_4uCvR79M_1svPte5xGAhhVmKyyTzOA@mail.gmail.com>
@ 2016-04-08 19:19     ` Michael Heerdegen
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Heerdegen @ 2016-04-08 19:19 UTC (permalink / raw)
  To: Alex Coventry; +Cc: 23237

Alex Coventry <alx@empirical.com> writes:

> Thanks, Michael.  Those changes fixed the problem.

Great.  Glenn has already closed the bug - thanks.

A hint: Please always Cc the original bug address (like I did in this
message) so that others can follow the conversation (you had answered
only to my private address).


Regards,

Michael.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-08 19:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-07  6:00 bug#23237: Strange behavior of `package` in automated install in init script Alex Coventry
2016-04-07 15:54 ` Michael Heerdegen
     [not found]   ` <CAAC0Up8JaRkhC=8t5D+_4uCvR79M_1svPte5xGAhhVmKyyTzOA@mail.gmail.com>
2016-04-08 19:19     ` Michael Heerdegen

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).