From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rene Subject: Re: create a symlink Date: Thu, 07 Mar 2019 16:11:50 -0600 Message-ID: References: <20180419082632.133ccb70@scratchpost.org> <20180427170848.23d95667@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:47857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h27kj-0004p1-KL for guix-devel@gnu.org; Fri, 08 Mar 2019 00:09:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h27kg-0000Np-Rg for guix-devel@gnu.org; Fri, 08 Mar 2019 00:09:00 -0500 Received: from mail-ot1-x343.google.com ([2607:f8b0:4864:20::343]:41961) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h27kf-0000Em-Ii for guix-devel@gnu.org; Fri, 08 Mar 2019 00:08:58 -0500 Received: by mail-ot1-x343.google.com with SMTP id t7so16331419otk.8 for ; Thu, 07 Mar 2019 21:08:56 -0800 (PST) In-Reply-To: <20180427170848.23d95667@scratchpost.org> (Danny Milosavljevic's message of "Fri, 27 Apr 2018 17:08:48 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Danny Milosavljevic Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Danny, sorry for delay. I have updated my repository with commit dc7d6d4ece30c7ab25e9f1927d64f2b409ab896c(version 14). Danny Milosavljevic writes: > are you sure you put the call into guix/scripts/system.scm ? > > There are a lot of #$ things there already - should work. > > In gnu/build/install.scm it's not going to work. > > The Guix high-level packaging stuff is not available build-side, only hos= t=3D > -side. > > Can you provide a patch of what you did? > When doing `make` shows the error message: --8<---------------cut here---------------start------------->8--- Backtrace: 14 (primitive-load "/home/jin/guix/./build-aux/compile-all=E2=80= =A6") In guix/build/compile.scm: 158:6 13 (compile-files _ _ ("guix/scripts/system.scm" "gnu/b=E2=80=A6"= ) =E2=80=A6) 107:11 12 (load-files "." _ #:report-load _ #:debug-port _) In ice-9/boot-9.scm: 2800:17 11 (resolve-interface (guix scripts system) #:select _ # _ =E2=80= =A6) In ice-9/threads.scm: 390:8 10 (_ _) In ice-9/boot-9.scm: 2726:13 9 (_) In ice-9/threads.scm: 390:8 8 (_ _) In ice-9/boot-9.scm: 2994:20 7 (_) 2312:4 6 (save-module-excursion _) 3014:26 5 (_) In unknown file: 4 (primitive-load-path "guix/scripts/system" #) In ice-9/eval.scm: 191:35 3 (_ #f) 191:27 2 (_ #f) 223:20 1 (proc #) In unknown file: 0 (%resolve-variable (7 . ungexp) #) ERROR: In procedure %resolve-variable: ungexp: unbound variable Makefile:5463: recipe for target 'make-go' failed make[2]: *** [make-go] Error 1 make[2]: Leaving directory '/home/jin/guix' Makefile:4536: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/jin/guix' Makefile:3078: recipe for target 'all' failed make: *** [all] Error 2 --8<---------------cut here---------------end--------------->8--- Attached patch. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Add-symlink.patch >From c0756c7dd90c038f5daddcf4893f57e9701ab033 Mon Sep 17 00:00:00 2001 From: Rene Date: Thu, 7 Mar 2019 20:46:59 -0800 Subject: [PATCH] Add symlink. --- gnu/build/install.scm | 19 +++++++++++++++++++ guix/scripts/system.scm | 2 ++ 2 files changed, 21 insertions(+) diff --git a/gnu/build/install.scm b/gnu/build/install.scm index 9e30c0d23..202a9672d 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm @@ -27,6 +27,7 @@ populate-root-file-system reset-timestamps register-closure + install-hurd populate-single-profile-directory)) ;;; Commentary: @@ -144,6 +145,24 @@ includes /etc, /var, /run, /bin/sh, etc., and all the symlinks to SYSTEM." (try)) (apply throw args))))))) +(define (install-hurd pkg) + "Create a link to /gnu/store/..hurd-1.9 with the name /hurd." + + ;; Add /hurd link. + (let ((link-1 (string-append target + "/hurd"))) + (let try () + (catch 'system-error + (lambda () + (symlink pkg link-1)) + (lambda args + ;; If /hurd already exists, overwrite it. + (if (= EEXIST (system-error-errno args)) + (begin + (delete-file link-1) + (try)) + (apply throw args))))))) + (define (reset-timestamps directory) "Reset the timestamps of all the files under DIRECTORY, so that they appear as created and modified at the Epoch." diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index b688bb68c..be8e639b7 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -1151,3 +1151,5 @@ argument list and OPTS is the option alist." ;;; End: ;;; system.scm ends here + +(install-hurd #$hurd) -- 2.17.1 --=-=-= Content-Type: text/plain -- Rene --=-=-=--