GNU bug report logs - #33259
[PATCH 0/8] 'guix pack': Better '--localstatedir' handling and more tests

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Sun, 4 Nov 2018 22:03:02 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: 33259 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [bug#33259] [PATCH 6/8] pack: Add test for 'self-contained-tarball' with localstatedir.
Date: Sun,  4 Nov 2018 23:10:34 +0100
* tests/pack.scm ("self-contained-tarball + localstatedir"): New test.
---
 tests/pack.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/tests/pack.scm b/tests/pack.scm
index 63fef70c64..22321a3e46 100644
--- a/tests/pack.scm
+++ b/tests/pack.scm
@@ -89,6 +89,29 @@
 ;; quite inexpensively; see <https://bugs.gnu.org/32184>.
 
 (with-external-store store
+  (unless store (test-skip 1))
+  (test-assertm "self-contained-tarball + localstatedir" store
+    (mlet* %store-monad
+        ((guile   (set-guile-for-build (default-guile)))
+         (profile (profile-derivation (packages->manifest
+                                       (list %bootstrap-guile))
+                                      #:hooks '()
+                                      #:locales? #f))
+         (tarball (self-contained-tarball "tar-pack" profile
+                                          #:localstatedir? #t))
+         (check   (gexp->derivation
+                   "check-tarball"
+                   #~(let ((bin (string-append "." #$profile "/bin")))
+                       (setenv "PATH"
+                               (string-append #$%tar-bootstrap "/bin"))
+                       (system* "tar" "xvf" #$tarball)
+                       (mkdir #$output)
+                       (exit
+                        (and (file-exists? "var/guix/db/db.sqlite")
+                             (string=? (string-append #$%bootstrap-guile "/bin")
+                                       (readlink bin))))))))
+      (built-derivations (list check))))
+
   (unless store (test-skip 1))
   (test-assertm "docker-image + localstatedir" store
     (mlet* %store-monad
-- 
2.19.1





This bug report was last modified 6 years and 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.