--- Begin Message ---
Subject: |
Commit 47a60325c broke tests/pack.scm |
Date: |
Tue, 22 May 2018 23:09:58 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hi,
It seems that tests/pack.scm began to fail at commit
47a60325ca650e8fc1a291c8655b4297f4de8deb. This commit made the
following change in guix/scripts/pack.scm:
--8<---------------cut here---------------start------------->8---
(define symlink->directives
;; Return "populate directives" to make the given symlink and its
;; parent directories.
(match-lambda
((source '-> target)
(let ((target (string-append #$profile "/" target)))
`((directory ,(dirname source))
- (,source -> ,target))))))
+ (,source
+ -> ,(relative-file-name (dirname source) target)))))))
--8<---------------cut here---------------end--------------->8---
It seems this causes the test to fail because it calls
relative-file-name like this in the test:
(relative-file-name "/bin"
"/home/marusich/guix-upgrade-gnucash/test-tmp/store/3j3mrl1sf3bcx4fzlz655mzsp4bir54j-profile/bin/guile")
which evaluates to
"../home/marusich/guix-upgrade-gnucash/test-tmp/store/3j3mrl1sf3bcx4fzlz655mzsp4bir54j-profile/bin/guile"
which is not equal to
"/home/marusich/guix-upgrade-gnucash/test-tmp/store/3j3mrl1sf3bcx4fzlz655mzsp4bir54j-profile/bin/guile"
so the test fails.
What is the purpose of calling relative-file-name here?
--
Chris
signature.asc
Description: PGP signature
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#31560: Commit 47a60325c broke tests/pack.scm |
Date: |
Fri, 01 Jun 2018 15:41:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello,
Chris Marusich <address@hidden> skribis:
> I believe the attached patches fix the issue when applied to the master
> branch. The failing test now passes (along with all the other "make
> check" tests). What do you think? If you approve, then I'll commit it
> to the master branch.
I looked some more and the patch would create broken links. I concluded
that the issue was simply that the test needed to be adjusted to expect
a relative symlink instead of an absolute symlink.
I first cherry-picked the fix that Ricardo made in ‘core-updates’ (same
as the one you posted) as commit
44057a461b1fa8102938c4e0f54d7cbc9dd09b03. Then I adjusted the test in
commit ccc951cab3172adfdaf6fd2dfa8f8cdb98358a69.
Let me know if you think something is amiss!
Thank you,
Ludo’.
--- End Message ---