GNU bug report logs -
#74670
[PATCH] tests: pack: Fix AppImage tests.
Previous Next
Reported by: Noé Lopez <noe <at> xn--no-cja.eu>
Date: Tue, 3 Dec 2024 15:13:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
From: Noé Lopez <noelopez <at> free.fr>
* guix/scripts/pack.scm (self-contained-appimage): Support localstatedir
option.
Change-Id: I296b3d3e442aa90f36de62a9b23aba4a2c3de9a0
---
guix/scripts/pack.scm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index d0e66c3013..7f5a5f2aa7 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -1018,15 +1018,22 @@ (define* (self-contained-appimage name profile
compressor-name
%valid-compressors)))
+ (define database
+ (and localstatedir?
+ (file-append (store-database (list profile))
+ "/db/db.sqlite")))
+
(define builder
(with-extensions (list guile-gcrypt)
(with-imported-modules (source-module-closure
'((guix build store-copy)
- (guix build utils))
+ (guix build utils)
+ (gnu build install))
#:select? not-config?)
#~(begin
(use-modules (guix build utils)
(guix build store-copy)
+ (gnu build install)
(rnrs io ports)
(srfi srfi-1)
(srfi srfi-26))
@@ -1060,6 +1067,10 @@ (define* (self-contained-appimage name profile
(string-append appdir "/" #$name ".desktop")
#:name #$name
#:exec #$entry-point)
+ ;; Install database and gc roots.
+ (when #+database
+ ;; Initialize /var/guix.
+ (install-database-and-gc-roots appdir #+database profile))
;; Compress the AppDir.
(invoke #+(file-append squashfs-tools "/bin/mksquashfs") appdir
squashfs "-root-owned" "-noappend"
--
2.46.0
This bug report was last modified 114 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.