swh: Adjust 'origin' test.
[jackhill/guix/guix.git] / tests / pack.scm
index 40473a9..0c1406e 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -28,7 +28,7 @@
   #:use-module (guix tests)
   #:use-module (guix gexp)
   #:use-module (gnu packages bootstrap)
-  #:use-module ((gnu packages compression) #:select (squashfs-tools-next))
+  #:use-module ((gnu packages compression) #:select (squashfs-tools))
   #:use-module (srfi srfi-64))
 
 (define %store
                          (when
                           (and (file-exists? (string-append bin "/guile"))
                                (file-exists? "var/guix/db/db.sqlite")
+                               (file-is-directory? "tmp")
                                (string=? (string-append #$%bootstrap-guile "/bin")
                                          (pk 'binlink (readlink bin)))
                                (string=? (string-append #$profile "/bin/guile")
                            (string-append "." #$profile "/bin"))
 
                          (setenv "PATH"
-                                 (string-append #$squashfs-tools-next "/bin"))
+                                 (string-append #$squashfs-tools "/bin"))
                          (invoke "unsquashfs" #$image)
                          (with-directory-excursion "squashfs-root"
                            (when (and (file-exists? (string-append bin
                                       (file-exists? "var/guix/db/db.sqlite")
                                       (string=? (string-append #$%bootstrap-guile "/bin")
                                                 (pk 'binlink (readlink bin)))
-                                      (string=? (string-append #$profile "/bin")
+
+                                      ;; This is a relative symlink target.
+                                      (string=? (string-drop
+                                                 (string-append #$profile "/bin")
+                                                 1)
                                                 (pk 'guilelink (readlink "bin"))))
                              (mkdir #$output))))))))
       (built-derivations (list check)))))