[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19657: 25.0.50; Test failures in Emacs master, can't figure out what
From: |
Glenn Morris |
Subject: |
bug#19657: 25.0.50; Test failures in Emacs master, can't figure out what I'm doing wrong |
Date: |
Thu, 22 Jan 2015 19:50:30 -0500 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Glenn Morris wrote:
> mkdir $HOME/foo
> TMPDIR=$HOME/foo make package-test # fails
I think this is due to with-package-test's manipulation of HOME in
process-environment. The problem can be summarized as:
(file-truename (abbreviate-file-name "/home/rgm/foo"))
-> "/home/rgm/foo"
(let ((process-environment (cons "HOME=/home/rgm/bar" process-environment)))
(file-truename (abbreviate-file-name "/home/rgm/foo")))
-> "/home/rgm/bar/foo"
Because abbreviated-home-dir is cached the first time it is used.
And find-file-noselect does various cycles of abbreviate/expand/truename.
So calling find-file-noselect after changing HOME will mess up for
files under the new HOME.
So basically if you want to change HOME, remember to reset
abbreviated-home-dir as well, else get various odd problems.
Yuck.
Anyway, the following patch seems to fix this specific case.
(Maybe abbreviated-home-dir should either be removed, or check that HOME
hasn't changed since it was set.)
*** a/test/automated/package-test.el
--- b/test/automated/package-test.el
***************
*** 91,96 ****
--- 91,97 ----
`(let* ((package-test-user-dir (make-temp-file "pkg-test-user-dir-" t))
(process-environment (cons (format "HOME=%s" package-test-user-dir)
process-environment))
+ (abbreviated-home-dir)
(package-user-dir package-test-user-dir)
(package-archives `(("gnu" . ,package-test-data-dir)))
(old-yes-no-defn (symbol-function 'yes-or-no-p))
***************
*** 340,346 ****
(should (search-forward "simple-single is an installed package." nil t))
(should (search-forward
(format "Status: Installed in `%s/' (unsigned)."
! (expand-file-name "simple-single-1.3" package-user-dir))
nil t))
(should (search-forward "Version: 1.3" nil t))
(should (search-forward "Summary: A single-file package with no
dependencies"
--- 341,348 ----
(should (search-forward "simple-single is an installed package." nil t))
(should (search-forward
(format "Status: Installed in `%s/' (unsigned)."
! (abbreviate-file-name
! (expand-file-name "simple-single-1.3"
package-user-dir)))
nil t))
(should (search-forward "Version: 1.3" nil t))
(should (search-forward "Summary: A single-file package with no
dependencies"
***************
*** 410,416 ****
(should (search-forward "signed-good is an installed package." nil t))
(should (search-forward
(format "Status: Installed in `%s/'."
! (expand-file-name "signed-good-1.0" package-user-dir))
nil t))))))
--- 412,419 ----
(should (search-forward "signed-good is an installed package." nil t))
(should (search-forward
(format "Status: Installed in `%s/'."
! (abbreviate-file-name
! (expand-file-name "signed-good-1.0"
package-user-dir)))
nil t))))))
- bug#19657: 25.0.50; Test failures in Emacs master, can't figure out what I'm doing wrong, Jorgen Schaefer, 2015/01/22
- bug#19657: 25.0.50; Test failures in Emacs master, can't figure out what I'm doing wrong, Glenn Morris, 2015/01/22
- bug#19657: 25.0.50; Test failures in Emacs master, can't figure out what I'm doing wrong,
Glenn Morris <=
- bug#19657: 25.0.50; Test failures in Emacs master, can't figure out what I'm doing wrong, Dmitry Gutov, 2015/01/22
- bug#19657: 25.0.50; Test failures in Emacs master, can't figure out what I'm doing wrong, Glenn Morris, 2015/01/22
- bug#19657: 25.0.50; Test failures in Emacs master, can't figure out what I'm doing wrong, Eli Zaretskii, 2015/01/23
- bug#19657: 25.0.50; Test failures in Emacs master, can't figure out what I'm doing wrong, Dmitry Gutov, 2015/01/23