From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alex Coventry Newsgroups: gmane.emacs.bugs Subject: bug#23237: Strange behavior of `package` in automated install in init script Date: Thu, 7 Apr 2016 02:00:53 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c25fd4181c8a052fdecd56 X-Trace: ger.gmane.org 1460042903 20759 80.91.229.3 (7 Apr 2016 15:28:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Apr 2016 15:28:23 +0000 (UTC) To: 23237@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 07 17:28:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aoBqs-0008GZ-Eh for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Apr 2016 17:28:10 +0200 Original-Received: from localhost ([::1]:50616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoBqr-0000v7-TZ for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Apr 2016 11:28:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoBqm-0000v0-96 for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2016 11:28:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoBqk-00037Y-I8 for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2016 11:28:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoBqk-00037U-9T for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2016 11:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1aoBqk-00023H-5q for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2016 11:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Coventry Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Apr 2016 15:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23237 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14600428657862 (code B ref -1); Thu, 07 Apr 2016 15:28:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Apr 2016 15:27:45 +0000 Original-Received: from localhost ([127.0.0.1]:53059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoBqS-00022j-JU for submit@debbugs.gnu.org; Thu, 07 Apr 2016 11:27:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ao30G-0000ZG-IJ for submit@debbugs.gnu.org; Thu, 07 Apr 2016 02:01:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ao304-00042o-MQ for submit@debbugs.gnu.org; Thu, 07 Apr 2016 02:01:11 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:43968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ao304-00042i-Iy for submit@debbugs.gnu.org; Thu, 07 Apr 2016 02:01:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ao2zx-0000qC-VU for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2016 02:01:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ao2zv-00041q-Tt for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2016 02:00:57 -0400 Original-Received: from mail-lb0-x233.google.com ([2a00:1450:4010:c04::233]:33083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ao2zv-00041b-B7 for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2016 02:00:55 -0400 Original-Received: by mail-lb0-x233.google.com with SMTP id u8so43151782lbk.0 for ; Wed, 06 Apr 2016 23:00:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=empirical.com; s=google; h=mime-version:date:message-id:subject:from:to; bh=XM31+pNVSUOm3E/7i1z979QRCCA8v9LMriIFY9l8meU=; b=JWfIkqs8ldhEdTJwIDQ9jnGCK4ToRm3BFsiXP11kOzejBbUqGLc0O2b0Juq+O+FVL8 Gx3VVZaxMUKP5f/t7V8ZPkLM1fJXt3/1hA19q6IGxkkWukcckpq9af64aiBMsE1bprYK vrDc4KsZMWU8vkDkVL5DkrmdZCW3X3VWuspKQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=XM31+pNVSUOm3E/7i1z979QRCCA8v9LMriIFY9l8meU=; b=hldymSlNSmZgt4dwPpql6h6Y71Kg9SPbqhpYNwlYBhptD4tSYNPF/zPCb/2u5Nmtqq 0Z75uwpkNjcJaBHCWMkTDivGyDRtJXf+VtXWt3UUiJIWfXGBBGSYNg6U5BKcniBNvExe Z+ILriy64JKtmGe9w+U4Fm3IIWBz0EnMwNvoyFicvEkQ3TSKUko0smuxtvrt3VeQUGIl +NUbtf8YKRkxCi84P6aVLAjlpTM8QuP9ROOEscNyPsNnqk333z6zwlpLcWQNRUIkwXrk WVTK4OUUtZ12V0Svg/Yd/fReaehuhrpTqNRtrga/0eqV996Qd3Vc5sXL858Ro/WXYrZq ydFA== X-Gm-Message-State: AD7BkJI3u2CXLbGKdBMw0WDKQyH7h+a0RLN8qNRXqCdQsHNeR5/DdlIFAMJxgxOK93HFyjMXffkZVb+RMTHvDw== X-Received: by 10.112.167.37 with SMTP id zl5mr587747lbb.60.1460008853701; Wed, 06 Apr 2016 23:00:53 -0700 (PDT) Original-Received: by 10.114.173.208 with HTTP; Wed, 6 Apr 2016 23:00:53 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Thu, 07 Apr 2016 11:27:43 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:116159 Archived-At: --001a11c25fd4181c8a052fdecd56 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 =E2=80=98evil-=E2=80=99 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)) --001a11c25fd4181c8a052fdecd56 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
This is a report of two bugs in a fresh install of em= acs on the ubuntu:14.04 docker image and the following elisp in install-pac= kage.el

=C2=A0 (require 'package)
=C2=A0 (add-to-list
=C2=A0 =C2=A0'package-archives
=C2=A0 =C2=A0'("melpa" . "http://melpa.org/packages/")
=C2=A0 =C2=A0t)=
=C2=A0 (package-initialize)
=C2=A0 (package-refresh-co= ntents)
=C2=A0 (message (format "package contents: %s" = package-archive-contents))
=C2=A0=C2=A0(package-install &qu= ot;evil")

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

=C2=A0=C2=A0root@cecce30d6adf:/emacs# e= macs -l install-package.el=C2=A0
=C2=A0=C2=A0root@cecce30d6adf:/e= macs# emacs -batch --eval '(setq user-init-file "~/.emacs")&#= 39; -l install-package.el

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

The second (original) bug i= s 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=C2=A0alxempirical/emacs-git-master as soon as it's pus= hed. =C2=A0(It's on the order of a gig, though.)

Best regards,
Alex

FROM ubuntu:1= 4.04
RUN apt-get update && apt-get upgrade -y
R= UN 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
WOR= KDIR emacs
RUN ./autogen.sh
RUN ./autogen.sh git
<= div>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)
=
=C2=A0of 2016-04-07 built on f0726407848b
Repository revisio= n: 1f6b0bc1512de08fd542df0234476788038c8c82
System Description: Ubuntu 14.04.4 LTS

Configured features:
SOUND NOTIFY
Important settings:
=C2=A0 locale-coding-system: nil<= /div>

Major mode: Lisp Interaction

<= div>Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2= =A0 global-eldoc-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t
<= div>=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: = t
=C2=A0 auto-compression-mode: t
=C2=A0 line-number-mo= de: t
=C2=A0 transient-mark-mode: t

Rece= nt messages:
For information about GNU Emacs and the GNU system, = type C-h C-a.
Importing package-keyring.gpg...done
Cont= acting host: elpa.gnu.org:80 [2 time= s]
Contacting host: melpa.org:80<= /a>
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 speedb= ar
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 rma= il tool-bar
rmail-loaddefs mailabbrev gmm-utils mailheader mm-dec= ode mm-bodies
mm-encode mail-utils network-stream starttls url-ht= tp tls gnutls
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-dru= ms mail-prsvr url-gw
nsm puny seq url-cache url-auth url url-prox= y url-privacy url-expand
url-methods url-history url-cookie url-d= omsuf url-util mailcap epg
term/xterm xterm time-date finder-inf = package epg-config url-handlers
url-parse auth-source cl-seq eiei= o byte-opt bytecomp byte-compile
cl-extra help-mode easymenu ccon= v eieio-core cl-macs gv eieio-loaddefs
cl-loaddefs pcase cl-lib p= assword-cache url-vars disp-table mule-util
tooltip eldoc electri= c uniquify ediff-hook vc-hooks lisp-float-type
tabulated-list new= comment elisp-mode lisp-mode prog-mode register page
menu-bar rfn= -eshadow timer select mouse jit-lock font-lock syntax
facemenu fo= nt-core term/tty-colors frame cl-generic cham georgian
utf-8-lang= misc-lang vietnamese tibetan thai tai-viet lao korean
japanese e= ucjp-ms cp51932 hebrew greek romanian slovak czech european
ethio= pic indian cyrillic chinese charscript case-table epa-hook
jka-cm= pr-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
h= ashtable-print-readable backquote inotify multi-tty
make-network-= process emacs)

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

--001a11c25fd4181c8a052fdecd56--