Bug#920219: [Pkg-emacsen-addons] Bug#920219: elpa-company: Post install script failing

2019-01-24 Thread Erich Beyer
1) No, it is the same information that appears in the "dpkg --configure -a"
output in my original email. I will duplicate it below.

2) I tried:
A)
 $ sudo emacs ...
B)
 $ sudo -s
 # emacs ...
C)
 $ sudo -s
 # su
 # emacs ...

Iteration C produced the same output as you. I have env_keep in my
/etc/sudoers. I think emacs in the script is seaching $HOME/.emacs.d/ and my
init.el is causing it to add $HOME/.emacs.d/elpa to the load-path. For
iteration
A and B, $HOME="/home/myusername" and no output was produced.

 $ sudo sh -c 'echo $HOME'
 /home/myusername

 $ sudo -s
 # unset HOME
 # emacs --quick  --batch -l package \
--eval "(add-to-list 'package-directory-list
\"/usr/share/emacs/site-lisp/elpa-src/company-0.9.6\")" \
 -f package-initialize --eval "(message (locate-library
\"company-tests\"))"
 /usr/share/emacs/site-lisp/elpa-src/company-0.9.6/company-tests.el

3) By ~/ I mean "/home/myusername/"

I am ready to admit that this is an issue with my site configuration, and
not a
likely issue for other users. It could be prevented by unsetting HOME in the
/usr/lib/emacsen-common/packages/install/elpa-company script or setting
HOME to
a known-good directory.

$ cat /usr/share/emacs/site-lisp/elpa/company-0.9.6/Install.log

In toplevel form:
async-tests.el:22:1:Error: Cannot open load file: No such file or
directory, company-tests

In toplevel form:
bbdb-tests.el:22:1:Error: Cannot open load file: No such file or directory,
company-tests

In toplevel form:
clang-tests.el:22:1:Error: Cannot open load file: No such file or
directory, company-tests

In company-calculate-candidates:
company.el:1196:8:Warning: function company-calculate-candidates used to
take
2 arguments, now takes 1

In toplevel form:
core-tests.el:22:1:Error: Cannot open load file: No such file or directory,
company-tests

In toplevel form:
elisp-tests.el:24:1:Error: Cannot open load file: No such file or
directory, company-tests

In toplevel form:
files-tests.el:22:1:Error: Cannot open load file: No such file or
directory, company-tests

In toplevel form:
frontends-tests.el:22:1:Error: Cannot open load file: No such file or
directory, company-tests

In toplevel form:
template-tests.el:22:1:Error: Cannot open load file: No such file or
directory, company-tests

In toplevel form:
transformers-tests.el:22:1:Error: Cannot open load file: No such file or
directory, company-tests


Bug#920219: elpa-company: Post install script failing

2019-01-22 Thread Erich Beyer
Package: elpa-company
Version: 0.9.6-1
Severity: important

Dear Maintainer,

Before upgrading to sid, I had installed elpy using the instructions
at https://github.com/jorgenschaefer/elpy. After upgrading; and
attempting to use the apt-get install method, the post install script
fails during installation of the package elpa-company.

I was able to resolve the issue by temporarily moving my ~/.emacs.d/
directory to a different location. The previous elpa-company
installation at ~/.emacs.d/elpa/company-20190109.2336/ did not contain
the file "company-tests.el". The installation script
/usr/lib/emacsen-common/packages/install/elpa-company appears to use
the load-path of my user and find the company package in my home
directory instead of the
/usr/lib/emacsen-common/packages/install/elpa-company directory.

I am guessing this could be fixed by setting the load-path with an
eval statement in the emacs call of the
/usr/lib/emacsen-common/packages/install/elpa-company script?

I probably have to remove the melpa distributed company package from
my user's ~/.emacs.d/ directory to actually use the debian packaged
version.

Thanks,

Erich

$ sudo dpkg --configure -a
Setting up elpa-company (0.9.6-1) ...
+ [ configure = configure ]
+ [ -e /var/lib/emacsen-common/state/package/installed/emacsen-common -a -x 
/usr/lib/emacsen-common/emacs-package-install ]
+ /usr/lib/emacsen-common/emacs-package-install --postinst elpa-company
Install emacsen-common for emacs
emacsen-common: Handling install of emacsen flavor emacs
Install elpa-company for emacs
install/company-0.9.6: Handling install of emacsen flavor emacs
install/company-0.9.6: byte-compiling for emacs

In toplevel form:
async-tests.el:22:1:Error: Cannot open load file: No such file or directory, 
company-tests

In toplevel form:
bbdb-tests.el:22:1:Error: Cannot open load file: No such file or directory, 
company-tests

In toplevel form:
clang-tests.el:22:1:Error: Cannot open load file: No such file or directory, 
company-tests

In company-calculate-candidates:
company.el:1196:8:Warning: function company-calculate-candidates used to take
2 arguments, now takes 1

In toplevel form:
core-tests.el:22:1:Error: Cannot open load file: No such file or directory, 
company-tests

In toplevel form:
elisp-tests.el:24:1:Error: Cannot open load file: No such file or directory, 
company-tests

In toplevel form:
files-tests.el:22:1:Error: Cannot open load file: No such file or directory, 
company-tests

In toplevel form:
frontends-tests.el:22:1:Error: Cannot open load file: No such file or 
directory, company-tests

In toplevel form:
template-tests.el:22:1:Error: Cannot open load file: No such file or directory, 
company-tests

In toplevel form:
transformers-tests.el:22:1:Error: Cannot open load file: No such file or 
directory, company-tests
ERROR: install script from elpa-company package failed
dpkg: error processing package elpa-company (--configure):
 installed elpa-company package post-installation script subprocess returned 
error exit status 1
 dpkg: dependency problems prevent configuration of elpa-elpy:
  elpa-elpy depends on elpa-company (>= 0.9.2); however:
Package elpa-company is not configured yet.

dpkg: error processing package elpa-elpy (--configure):
 dependency problems - leaving unconfigured
 Errors were encountered while processing:
  elpa-company

$ find ~/.emacs.d/elpa/company-20190109.2336/ -iname "*.el"
~/.emacs.d/elpa/company-20190109.2336/company-xcode.el
~/.emacs.d/elpa/company-20190109.2336/company-files.el
~/.emacs.d/elpa/company-20190109.2336/company-ispell.el
~/.emacs.d/elpa/company-20190109.2336/company-nxml.el
~/.emacs.d/elpa/company-20190109.2336/company-css.el
~/.emacs.d/elpa/company-20190109.2336/company-eclim.el
~/.emacs.d/elpa/company-20190109.2336/company-etags.el
~/.emacs.d/elpa/company-20190109.2336/company-elisp.el
~/.emacs.d/elpa/company-20190109.2336/company-abbrev.el
~/.emacs.d/elpa/company-20190109.2336/company-clang.el
~/.emacs.d/elpa/company-20190109.2336/company-capf.el
~/.emacs.d/elpa/company-20190109.2336/company-bbdb.el
~/.emacs.d/elpa/company-20190109.2336/company-dabbrev.el
~/.emacs.d/elpa/company-20190109.2336/company-semantic.el
~/.emacs.d/elpa/company-20190109.2336/company-template.el
~/.emacs.d/elpa/company-20190109.2336/company-tng.el
~/.emacs.d/elpa/company-20190109.2336/company-yasnippet.el
~/.emacs.d/elpa/company-20190109.2336/company-autoloads.el
~/.emacs.d/elpa/company-20190109.2336/company-dabbrev-code.el
~/.emacs.d/elpa/company-20190109.2336/company.el
~/.emacs.d/elpa/company-20190109.2336/company-pkg.el
~/.emacs.d/elpa/company-20190109.2336/company-tempo.el
~/.emacs.d/elpa/company-20190109.2336/company-cmake.el
~/.emacs.d/elpa/company-20190109.2336/company-oddmuse.el
~/.emacs.d/elpa/company-20190109.2336/company-keywords.el
~/.emacs.d/elpa/company-20190109.2336/company-gtags.el

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What