From: Danny Milosavljevic <dannym@scratchpost.org>
To: 42983@debbugs.gnu.org
Subject: bug#42983: "sudo -E guix pull" breaks ~/.config/guix/current for regular user
Date: Mon, 24 Aug 2020 02:11:13 +0200 [thread overview]
Message-ID: <20200824021113.71a79f10@scratchpost.org> (raw)
In-Reply-To: <20200822122750.78ddc111@scratchpost.org>
[-- Attachment #1: Type: text/plain, Size: 1870 bytes --]
On Sat, 22 Aug 2020 12:27:50 +0200
Danny Milosavljevic <dannym@scratchpost.org> wrote:
> /var/guix/profiles/per-user/dannym/current-guix
Follow-up errors (translated to English manually):
dannym@dayas ~$ guix pull
Migrating profile generations to „/var/guix/profiles/per-user/dannym“ …
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/current-guix current
dannym@dayas ~/.config/guix$ guix pull
Refreshing channel „guix“ from Git-Repository „https://git.savannah.gnu.org/git/guix.git“ …
guix pull: error: Git-Error: failed open - '/home/dannym/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq/.git/FETCH_HEAD' is 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. Move
;; 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
;; <https://bugs.gnu.org/36785>.
(unless (or (getenv "SUDO_USER")
(string=? %profile-directory
(dirname
(canonicalize-profile %user-profile-directory))))
(migrate-generations %user-profile-directory %profile-directory))
where
%profile-directory = "/var/guix/profiles/per-user/dannym"
%user-profile-directory = "/home/dannym/.config/guix/current" (which is a
symlink to /var/guix/profiles/per-user/root/current-guix)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-08-24 0:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-22 10:27 bug#42983: "sudo -E guix pull" breaks ~/.config/guix/current for regular user Danny Milosavljevic
2020-08-22 16:20 ` Bengt Richter
2020-08-23 23:53 ` Danny Milosavljevic
[not found] ` <20200824023829.GA18670@LionPure>
2020-08-25 8:43 ` Danny Milosavljevic
2020-08-22 16:22 ` Leo Famulari
2020-08-23 21:24 ` Danny Milosavljevic
2020-08-23 21:45 ` Leo Famulari
2020-08-24 0:11 ` Danny Milosavljevic [this message]
2020-08-28 13:41 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200824021113.71a79f10@scratchpost.org \
--to=dannym@scratchpost.org \
--cc=42983@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).