unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex Coventry <alx@empirical.com>
To: 23237@debbugs.gnu.org
Subject: bug#23237: Strange behavior of `package` in automated install in init script
Date: Thu, 7 Apr 2016 02:00:53 -0400	[thread overview]
Message-ID: <CAAC0Up87EsJ4wHEb17_-v81MtU3nRQs2oBT8hfAL+1KSXmt3dA@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2016-04-07  6:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07  6:00 Alex Coventry [this message]
2016-04-07 15:54 ` bug#23237: Strange behavior of `package` in automated install in init script Michael Heerdegen
     [not found]   ` <CAAC0Up8JaRkhC=8t5D+_4uCvR79M_1svPte5xGAhhVmKyyTzOA@mail.gmail.com>
2016-04-08 19:19     ` Michael Heerdegen

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=CAAC0Up87EsJ4wHEb17_-v81MtU3nRQs2oBT8hfAL+1KSXmt3dA@mail.gmail.com \
    --to=alx@empirical.com \
    --cc=23237@debbugs.gnu.org \
    /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).