el-get-update fails #809

Closed
dabrahams opened this Issue Jul 17, 2012 · 4 comments

Comments

Projects
None yet
4 participants
Contributor

dabrahams commented Jul 17, 2012

I added

(:name session :url "http://downloads.sourceforge.net/project/emacs-session/session/2.3a/session-2.3a.tar.gz")

to the front of my el-get-sources and did a M-x el-get-update session:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  expand-file-name(nil "/Users/dave/.emacs.d/el-get/session/")
  (directory-files (expand-file-name dir pdir) nil "[^.]$")
  (let* ((--cl-var-- (directory-files (expand-file-name dir pdir) nil "[^.]$")) (fname nil) (fullname nil) (newname nil)) (while (consp --cl-var--) (setq fname (car --cl-var--)) (setq fullname (expand-file-name fname (expand-file-name dir pdir))) (setq newname (expand-file-name pdir fname)) (progn (el-get-verbose-message "%S %S %S" pdir dir fname) (el-get-verbose-message "mv %S %S" fullname newname) (rename-file fullname newname)) (setq --cl-var-- (cdr --cl-var--))) nil)
  (catch (quote --cl-block-nil--) (let* ((--cl-var-- (directory-files (expand-file-name dir pdir) nil "[^.]$")) (fname nil) (fullname nil) (newname nil)) (while (consp --cl-var--) (setq fname (car --cl-var--)) (setq fullname (expand-file-name fname (expand-file-name dir pdir))) (setq newname (expand-file-name pdir fname)) (progn (el-get-verbose-message "%S %S %S" pdir dir fname) (el-get-verbose-message "mv %S %S" fullname newname) (rename-file fullname newname)) (setq --cl-var-- (cdr --cl-var--))) nil))
  (cl-block-wrapper (catch (quote --cl-block-nil--) (let* ((--cl-var-- (directory-files (expand-file-name dir pdir) nil "[^.]$")) (fname nil) (fullname nil) (newname nil)) (while (consp --cl-var--) (setq fname (car --cl-var--)) (setq fullname (expand-file-name fname (expand-file-name dir pdir))) (setq newname (expand-file-name pdir fname)) (progn (el-get-verbose-message "%S %S %S" pdir dir fname) (el-get-verbose-message "mv %S %S" fullname newname) (rename-file fullname newname)) (setq --cl-var-- (cdr --cl-var--))) nil)))
  (block nil (let* ((--cl-var-- (directory-files (expand-file-name dir pdir) nil "[^.]$")) (fname nil) (fullname nil) (newname nil)) (while (consp --cl-var--) (setq fname (car --cl-var--)) (setq fullname (expand-file-name fname (expand-file-name dir pdir))) (setq newname (expand-file-name pdir fname)) (progn (el-get-verbose-message "%S %S %S" pdir dir fname) (el-get-verbose-message "mv %S %S" fullname newname) (rename-file fullname newname)) (setq --cl-var-- (cdr --cl-var--))) nil))
  (loop for fname in (directory-files (expand-file-name dir pdir) nil "[^.]$") for fullname = (expand-file-name fname (expand-file-name dir pdir)) for newname = (expand-file-name pdir fname) do (progn (el-get-verbose-message "%S %S %S" pdir dir fname) (el-get-verbose-message "mv %S %S" fullname newname) (rename-file fullname newname)))
  (if (cdr files) nil (loop for fname in (directory-files (expand-file-name dir pdir) nil "[^.]$") for fullname = (expand-file-name fname (expand-file-name dir pdir)) for newname = (expand-file-name pdir fname) do (progn (el-get-verbose-message "%S %S %S" pdir dir fname) (el-get-verbose-message "mv %S %S" fullname newname) (rename-file fullname newname))) (el-get-verbose-message "delete-directory: %s" (expand-file-name dir pdir)) (delete-directory (expand-file-name dir pdir)))
  (unless (cdr files) (loop for fname in (directory-files (expand-file-name dir pdir) nil "[^.]$") for fullname = (expand-file-name fname (expand-file-name dir pdir)) for newname = (expand-file-name pdir fname) do (progn (el-get-verbose-message "%S %S %S" pdir dir fname) (el-get-verbose-message "mv %S %S" fullname newname) (rename-file fullname newname))) (el-get-verbose-message "delete-directory: %s" (expand-file-name dir pdir)) (delete-directory (expand-file-name dir pdir)))
  (let* ((pdir (el-get-package-directory package)) (url (plist-get (el-get-package-def package) :url)) (tarfile (el-get-filename-from-url url)) (files (remove tarfile (directory-files pdir nil "[^.]$"))) (dir (car files))) (el-get-verbose-message "el-get: unpack cleanup %s [%s]: %S" package pdir files) (unless (cdr files) (loop for fname in (directory-files (expand-file-name dir pdir) nil "[^.]$") for fullname = (expand-file-name fname (expand-file-name dir pdir)) for newname = (expand-file-name pdir fname) do (progn (el-get-verbose-message "%S %S %S" pdir dir fname) (el-get-verbose-message "mv %S %S" fullname newname) (rename-file fullname newname))) (el-get-verbose-message "delete-directory: %s" (expand-file-name dir pdir)) (delete-directory (expand-file-name dir pdir))))
  el-get-http-unpack-cleanup-extract-hook(session)
  run-hook-with-args(el-get-http-unpack-cleanup-extract-hook session)
  (let* ((sync el-get-default-process-sync) (type (el-get-package-type package)) (hooks (el-get-method type :update-hook)) (commands (el-get-build-commands package))) (run-hook-with-args hooks package) (el-get-build package commands nil sync (quote el-get-post-update-build)))
  (lambda (package) "Post update PACKAGE. This will get run by a sentinel." (let* ((sync el-get-default-process-sync) (type (el-get-package-type package)) (hooks (el-get-method type :update-hook)) (commands (el-get-build-commands package))) (run-hook-with-args hooks package) (el-get-build package commands nil sync (quote el-get-post-update-build))))(session)
  funcall((lambda (package) "Post update PACKAGE. This will get run by a sentinel." (let* ((sync el-get-default-process-sync) (type (el-get-package-type package)) (hooks (el-get-method type :update-hook)) (commands (el-get-build-commands package))) (run-hook-with-args hooks package) (el-get-build package commands nil sync (quote el-get-post-update-build)))) session)
  (progn (funcall final-f package))
  (if (functionp final-f) (progn (funcall final-f package)))
  (when (functionp final-f) (funcall final-f package))
  (if next (el-get-start-process-list package next final-f) (when (functionp final-f) (funcall final-f package)))
  (let ((status (process-exit-status proc)) (cname (process-get proc :command-name)) (cbuf (process-get proc :buffer-name)) (message (process-get proc :message)) (errorm (process-get proc :error)) (package (process-get proc :el-get-package)) (final-f (process-get proc :el-get-final-func)) (next (process-get proc :el-get-start-process-list)) (el-get-sources (process-get proc :el-get-sources))) (if (not (eq 0 status)) (progn (when (process-buffer proc) (set-window-buffer (selected-window) cbuf)) (error "el-get: %s %s" cname errorm)) (message "el-get: %s" message)) (when cbuf (kill-buffer cbuf)) (if next (el-get-start-process-list package next final-f) (when (functionp final-f) (funcall final-f package))))
  (condition-case err (let ((status (process-exit-status proc)) (cname (process-get proc :command-name)) (cbuf (process-get proc :buffer-name)) (message (process-get proc :message)) (errorm (process-get proc :error)) (package (process-get proc :el-get-package)) (final-f (process-get proc :el-get-final-func)) (next (process-get proc :el-get-start-process-list)) (el-get-sources (process-get proc :el-get-sources))) (if (not (eq 0 status)) (progn (when (process-buffer proc) (set-window-buffer (selected-window) cbuf)) (error "el-get: %s %s" cname errorm)) (message "el-get: %s" message)) (when cbuf (kill-buffer cbuf)) (if next (el-get-start-process-list package next final-f) (when (functionp final-f) (funcall final-f package)))) ((debug error) (el-get-installation-failed (process-get proc :el-get-package) err)))
  (progn (condition-case err (let ((status (process-exit-status proc)) (cname (process-get proc :command-name)) (cbuf (process-get proc :buffer-name)) (message (process-get proc :message)) (errorm (process-get proc :error)) (package (process-get proc :el-get-package)) (final-f (process-get proc :el-get-final-func)) (next (process-get proc :el-get-start-process-list)) (el-get-sources (process-get proc :el-get-sources))) (if (not (eq 0 status)) (progn (when (process-buffer proc) (set-window-buffer (selected-window) cbuf)) (error "el-get: %s %s" cname errorm)) (message "el-get: %s" message)) (when cbuf (kill-buffer cbuf)) (if next (el-get-start-process-list package next final-f) (when (functionp final-f) (funcall final-f package)))) ((debug error) (el-get-installation-failed (process-get proc :el-get-package) err))))
  (if (eq (process-status proc) (quote exit)) (progn (condition-case err (let ((status (process-exit-status proc)) (cname (process-get proc :command-name)) (cbuf (process-get proc :buffer-name)) (message (process-get proc :message)) (errorm (process-get proc :error)) (package (process-get proc :el-get-package)) (final-f (process-get proc :el-get-final-func)) (next (process-get proc :el-get-start-process-list)) (el-get-sources (process-get proc :el-get-sources))) (if (not (eq 0 status)) (progn (when (process-buffer proc) (set-window-buffer ... cbuf)) (error "el-get: %s %s" cname errorm)) (message "el-get: %s" message)) (when cbuf (kill-buffer cbuf)) (if next (el-get-start-process-list package next final-f) (when (functionp final-f) (funcall final-f package)))) ((debug error) (el-get-installation-failed (process-get proc :el-get-package) err)))))
  (when (eq (process-status proc) (quote exit)) (condition-case err (let ((status (process-exit-status proc)) (cname (process-get proc :command-name)) (cbuf (process-get proc :buffer-name)) (message (process-get proc :message)) (errorm (process-get proc :error)) (package (process-get proc :el-get-package)) (final-f (process-get proc :el-get-final-func)) (next (process-get proc :el-get-start-process-list)) (el-get-sources (process-get proc :el-get-sources))) (if (not (eq 0 status)) (progn (when (process-buffer proc) (set-window-buffer (selected-window) cbuf)) (error "el-get: %s %s" cname errorm)) (message "el-get: %s" message)) (when cbuf (kill-buffer cbuf)) (if next (el-get-start-process-list package next final-f) (when (functionp final-f) (funcall final-f package)))) ((debug error) (el-get-installation-failed (process-get proc :el-get-package) err))))
  el-get-start-process-list-sentinel(#<process *tar (xzf) http://downloads.sourceforge.net/project/emacs-session/session/2.3a/session-2.3a.tar.gz*> "finished\n")
Collaborator

DarwinAwardWinner commented Jul 17, 2012

Looks like the variable dir is nil when it should be a string. We'll have to track down where it's getting set from.

Contributor

dabrahams commented Jul 17, 2012

on Tue Jul 17 2012, Ryan Thompson <reply+i-5668474-8a1fc1391591518075fa11aed4756d5453ff9075-44065-AT-reply.github.com> wrote:

Looks like the variable dir is nil when it should be a string. We'll
have to track down where it's getting set from.

The directory it was looking at had nothing in it but the tarball. The
regexp eliminated "." and "..", and the (remove ...) eliminated the
tarball, so the list was empty, a.k.a. nil

Dave Abrahams
BoostPro Computing
http://www.boostpro.com

dimitri was assigned Dec 14, 2012

Collaborator

npostavs commented Sep 24, 2013

I tried

(setq el-get-sources
      '((:name session :url "http://downloads.sourceforge.net/project/emacs-session/session/2.1c/session-2.1c.tar.gz")))
(el-get 'sync "session")

(setq el-get-sources
      '((:name session :url "http://downloads.sourceforge.net/project/emacs-session/session/session-2.3a.tar.gz")))
(el-get-update "session")

as el-get-issue-809.el, ./run-test.sh 809 succeeded. Perhaps this has been fixed by now?

Owner

dimitri commented Oct 5, 2013

Best would be to open a Pull Request with the test case, and have fixes #809 in the commit string so that we close that bug, have your name in the contributors, and a test case for later.

@npostavs npostavs added a commit to npostavs/el-get that referenced this issue Oct 6, 2013

@npostavs npostavs test http-tar method el-get-update
This test attempts to recreate the situation described in #809. The test
passes, which means either the issue has been fixed, or this test case
isn't actually testing the right thing.

closes #809
4cc57f3

yyr closed this in #1396 Oct 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment