From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#31560: Commit 47a60325c broke tests/pack.scm Date: Wed, 23 May 2018 09:46:03 +0200 Message-ID: <87lgca3jd0.fsf@gnu.org> References: <87bmd6zyvd.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLOUD-0003mF-SD for bug-guix@gnu.org; Wed, 23 May 2018 03:47:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLOUA-0002Js-Q0 for bug-guix@gnu.org; Wed, 23 May 2018 03:47:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:36808) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fLOUA-0002Jm-Lc for bug-guix@gnu.org; Wed, 23 May 2018 03:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fLOUA-0004mc-CE for bug-guix@gnu.org; Wed, 23 May 2018 03:47:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87bmd6zyvd.fsf@gmail.com> (Chris Marusich's message of "Tue, 22 May 2018 23:09:58 -0700") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Chris Marusich Cc: 31560@debbugs.gnu.org Hi Chris, Chris Marusich skribis: > It seems that tests/pack.scm began to fail at commit > 47a60325ca650e8fc1a291c8655b4297f4de8deb. This commit made the > following change in guix/scripts/pack.scm: > > (define symlink->directives > ;; Return "populate directives" to make the given symlink an= d 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)))))= )) > > 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/3j3mrl1sf3bcx4fzlz655= mzsp4bir54j-profile/bin/guile") > > which evaluates to > > "../home/marusich/guix-upgrade-gnucash/test-tmp/store/3j3mrl1sf3bcx4fzlz6= 55mzsp4bir54j-profile/bin/guile" > > which is not equal to > > "/home/marusich/guix-upgrade-gnucash/test-tmp/store/3j3mrl1sf3bcx4fzlz655= mzsp4bir54j-profile/bin/guile" > > so the test fails. Oooh, sorry about that. However what happens here is more something like: (relative-file-name "/home/marusich/guix-upgrade-gnucash/test-tmp/store/3j3mrl1sf3bcx4fzlz6= 55mzsp4bir54j-profile/bin" "/home/marusich/guix-upgrade-gnucash/test-tmp/store/3j3mrl1sf3bcx4fzlz6= 55mzsp4bir54j-profile/bin/guile") No? Hmm not sure=E2=80=A6 I suppose the test should ensure we get an appropriate relative symlink. > What is the purpose of calling relative-file-name here? The goal is to create only relative symlinks so that the tarball is relocatable: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D31360 --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix pack bash-static -S /bin/B=3Dbin/bash /gnu/store/7dks90572s5i8nnziippsskm7f4iyqhg-tarball-pack.tar.gz $ tar tvf /gnu/store/7dks90572s5i8nnziippsskm7f4iyqhg-tarball-pack.tar.gz |= grep bin/B lrwxrwxrwx root/root 0 1970-01-01 01:00 ./bin/B -> ../gnu/store/xqg= yj976y375wv8gaqh5mz0ysbfdk7f6-profile/bin/bash hrwxrwxrwx root/root 0 1970-01-01 01:00 ./bin/B link to ./bin/B --8<---------------cut here---------------end--------------->8--- (The =E2=80=9Clink to=E2=80=9D line really shouldn=E2=80=99t be here but le= t=E2=80=99s ignore it.) HTH! Ludo=E2=80=99.