guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/04: tests: Make sure /var/guix/gcroots/profiles is a valid symlink.


From: Ludovic Courtès
Subject: 04/04: tests: Make sure /var/guix/gcroots/profiles is a valid symlink.
Date: Sun, 28 Aug 2016 22:09:52 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit 334bda9a9e01b73b772b3f30b04abea35e5391f8
Author: Ludovic Courtès <address@hidden>
Date:   Sun Aug 28 23:48:14 2016 +0200

    tests: Make sure /var/guix/gcroots/profiles is a valid symlink.
    
    Reported by address@hidden (Carlos Sánchez de La Lama)
    at <https://lists.gnu.org/archive/html/guix-devel/2016-08/msg01641.html>.
    
    * gnu/build/install.scm (directives): Add /var/guix/gcroots/profiles
    symlink.
    * gnu/tests/base.scm (run-basic-test)["/var/guix/gcroots/profiles is a
    valid symlink"]: New test.
---
 gnu/build/install.scm |    6 +++++-
 gnu/tests/base.scm    |    9 +++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/gnu/build/install.scm b/gnu/build/install.scm
index aebf38c..7431a09 100644
--- a/gnu/build/install.scm
+++ b/gnu/build/install.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <address@hidden>
+;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -118,6 +118,10 @@ STORE."
     ("/var/guix/gcroots/booted-system" -> "/run/booted-system")
     ("/var/guix/gcroots/current-system" -> "/run/current-system")
 
+    ;; XXX: 'guix-register' creates this symlink with a wrong target, so
+    ;; create it upfront to be sure.
+    ("/var/guix/gcroots/profiles" -> "/var/guix/profiles")
+
     (directory "/bin")
     (directory "/tmp" 0 0 #o1777)                 ; sticky bit
     (directory "/var/tmp" 0 0 #o1777)
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index 0076566..ca6f76c 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -217,6 +217,15 @@ info --version")
                                       #f))))
                              marionette))
 
+          ;; This symlink is currently unused, but better have it point to the
+          ;; right place.  See
+          ;; 
<https://lists.gnu.org/archive/html/guix-devel/2016-08/msg01641.html>.
+          (test-equal "/var/guix/gcroots/profiles is a valid symlink"
+            "/var/guix/profiles"
+            (marionette-eval '(readlink "/var/guix/gcroots/profiles")
+                             marionette))
+
+
           (test-assert "screendump"
             (begin
               (marionette-control (string-append "screendump " #$output



reply via email to

[Prev in Thread] Current Thread [Next in Thread]