Hi,
For more context, see:
https://issues.guix.gnu.org/issue/42983
On Fri, 28 Aug 2020 at 15:41, Ludovic Courtès <[email protected]> wrote:
>> 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)
>
> We could detect such inconsistencies and emit a warning/hint. I’m
> unsure just how far we need to go in trying to prevent users from
> shooting themselves in the foot, though. Thoughts?
Considering it’s almost 5 years old without any activity, I propose to
close this ticket and let the users shoot themselves in their foot.
WDYT?
Cheers,
simon