From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id VBFeBNwFQ1+LFQAA0tVLHw (envelope-from ) for ; Mon, 24 Aug 2020 00:12:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id egNeO9sFQ1/rPAAAB5/wlQ (envelope-from ) for ; Mon, 24 Aug 2020 00:12:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6EED1940142 for ; Mon, 24 Aug 2020 00:12:11 +0000 (UTC) Received: from localhost ([::1]:47628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kA05o-0003pC-Ni for larch@yhetil.org; Sun, 23 Aug 2020 20:12:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kA05i-0003on-6v for bug-guix@gnu.org; Sun, 23 Aug 2020 20:12:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kA05h-0007SO-U3 for bug-guix@gnu.org; Sun, 23 Aug 2020 20:12:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kA05h-0005jV-PW for bug-guix@gnu.org; Sun, 23 Aug 2020 20:12:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42983: "sudo -E guix pull" breaks ~/.config/guix/current for regular user Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 24 Aug 2020 00:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42983 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 42983@debbugs.gnu.org Received: via spool by 42983-submit@debbugs.gnu.org id=B42983.159822788021984 (code B ref 42983); Mon, 24 Aug 2020 00:12:01 +0000 Received: (at 42983) by debbugs.gnu.org; 24 Aug 2020 00:11:20 +0000 Received: from localhost ([127.0.0.1]:55359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kA052-0005iW-77 for submit@debbugs.gnu.org; Sun, 23 Aug 2020 20:11:20 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:51202) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kA04z-0005iL-SS for 42983@debbugs.gnu.org; Sun, 23 Aug 2020 20:11:18 -0400 Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id D76253360C6A for <42983@debbugs.gnu.org>; Mon, 24 Aug 2020 02:11:16 +0200 (CEST) Date: Mon, 24 Aug 2020 02:11:13 +0200 From: Danny Milosavljevic Message-ID: <20200824021113.71a79f10@scratchpost.org> In-Reply-To: <20200822122750.78ddc111@scratchpost.org> References: <20200822122750.78ddc111@scratchpost.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/S=sYHUX5tIQrRDWhIxQmIS="; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -1.11 X-TUID: Azzn9bgBycfY --Sig_/S=sYHUX5tIQrRDWhIxQmIS= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, 22 Aug 2020 12:27:50 +0200 Danny Milosavljevic wrote: > /var/guix/profiles/per-user/dannym/current-guix Follow-up errors (translated to English manually): dannym@dayas ~$ guix pull Migrating profile generations to =E2=80=9E/var/guix/profiles/per-user/danny= m=E2=80=9C =E2=80=A6 guix pull: error: symlink: file exists: "/var/guix/profiles/per-user/dannym= /current-guix" 1 dannym@dayas ~$ rm ~/.config/guix/current dannym@dayas ~$ cd .config/guix/ dannym@dayas ~/.config/guix$ ln -s /var/guix/profiles/per-user/dannym/curr= ent-guix current dannym@dayas ~/.config/guix$ guix pull Refreshing channel =E2=80=9Eguix=E2=80=9C from Git-Repository =E2=80=9Ehttp= s://git.savannah.gnu.org/git/guix.git=E2=80=9C =E2=80=A6 guix pull: error: Git-Error: failed open - '/home/dannym/.cache/guix/checko= uts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq/.git/FETCH_HEAD' i= s locked: Permission denied That's some weird guix pull state. The culprit, I think, is this: (define (ensure-default-profile) (ensure-profile-directory) ;; In 0.15.0+ we'd create ~/.config/guix/current-[0-9]*-link symlinks. M= ove ;; them to %PROFILE-DIRECTORY. ;; ;; XXX: Ubuntu's 'sudo' preserves $HOME by default, and thus the second ;; condition below is always false when one runs "sudo guix pull". As a ;; workaround, skip this code when $SUDO_USER is set. See ;; . (unless (or (getenv "SUDO_USER") (string=3D? %profile-directory (dirname (canonicalize-profile %user-profile-directory)))) (migrate-generations %user-profile-directory %profile-directory)) where %profile-directory =3D "/var/guix/profiles/per-user/dannym" %user-profile-directory =3D "/home/dannym/.config/guix/current" (which is= a symlink to /var/guix/profiles/per-user/root/current-guix) --Sig_/S=sYHUX5tIQrRDWhIxQmIS= Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9DBaEACgkQ5xo1VCww uqWiMwf+II/z5OwbmOAELsuZc7REnUj53HpyjvaYLc8Y3tXPvEemo5XX/G/pgfwH lBGMvLvLhLzMXuQCclkimUmaYM5IyFyGpB6Ykc1WDzabMxjW3UUmntUY3sIoKS4V SHvla70Mf+CbClFZ2VHb3roBP/Q9WSSlKuJuG6EseNnLLzpyKRtylYBGGgRYIgLH KWRkmF2pe5mutb+JUMyhMxexRytXg+jxLf5LXnxc1skZ5xlM23MjSLyiIjS+VntH cPDLdO2NZp/CsA5gPzCXwRYf3njDwOWA+2GPGoPzl0OTA4fc1L+nvhj5dTl+RLVQ xnoabBGUl7nNAMIlZr256kLTTLGsOw== =gPgG -----END PGP SIGNATURE----- --Sig_/S=sYHUX5tIQrRDWhIxQmIS=--