From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: guix gc doesn't seem to clean old guix revision Date: Tue, 10 Dec 2019 17:19:43 +0100 Message-ID: <87eexcp2zk.fsf@gnu.org> References: <87h82u32v3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:52545) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ieiEk-0002U1-32 for guix-devel@gnu.org; Tue, 10 Dec 2019 11:19:47 -0500 In-Reply-To: (YOANN P.'s message of "Fri, 29 Nov 2019 15:14:35 +0000") 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: YOANN P Cc: "guix-devel@gnu.org" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Yoann, YOANN P skribis: >> It is similar to Bug#36785 [1]. > >> As said, it is not a bug of "guix pull" but a bug of the >> configuration. Adding the root user to your Dockerfile should fix the >> issue you encounter. > > The fact that guix require $USER to be set is IMO a kind of bug and is > documented anywhere. I had not understood that. I guess the patch below fixes it, I=E2=80=99ll = push it shortly. Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/guix/profiles.scm b/guix/profiles.scm index f5e5cc33d6..616605151e 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1727,7 +1727,9 @@ because the NUMBER is zero.)" (define %profile-directory (string-append %state-directory "/profiles/" (or (and=> (or (getenv "USER") - (getenv "LOGNAME")) + (getenv "LOGNAME") + (false-if-exception + (passwd:name (getpwuid (getuid))))) (cut string-append "per-user/" <>)) "default"))) --=-=-=--