[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Move switch-symlinks to (guix build utils)
From: |
Ludovic Courtès |
Subject: |
Re: Move switch-symlinks to (guix build utils) |
Date: |
Fri, 03 Jun 2022 21:30:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) |
Hi,
Maxime Devos <maximedevos@telenet.be> skribis:
> Maybe replace
>
> (symlink target pivot)
>
> by (symlink/remove-old target pivot)
>
> where
>
> (define (symlink/remove-old target link)
> "Make a symbolic link named LINK pointing to TARGET.
> If LINK already exists, it will be removed first.
> This is not an atomic operation."
> (catch 'system-error
> (lambda ()
> (symlink target link))
> (lambda stuff
> (if (= (system-error-errno stuff) EEXIST)
> (begin
> ;; remove old link and retry
> (delete-file link)
> (symlink/remove-old link target))
> (apply throw stuff)))))
Alright, SGTM (this procedure would be kept private).
So Arun, the floor is yours! :-)
Ludo’.
- Move switch-symlinks to (guix build utils), Arun Isaac, 2022/06/01
- Re: Move switch-symlinks to (guix build utils), Maxime Devos, 2022/06/01
- Re: Move switch-symlinks to (guix build utils), Arun Isaac, 2022/06/02
- Re: Move switch-symlinks to (guix build utils), Maxime Devos, 2022/06/02
- Re: Move switch-symlinks to (guix build utils), Ludovic Courtès, 2022/06/03
- Re: Move switch-symlinks to (guix build utils), Maxime Devos, 2022/06/03
- Re: Move switch-symlinks to (guix build utils),
Ludovic Courtès <=
- Re: Move switch-symlinks to (guix build utils), Ludovic Courtès, 2022/06/03
- Re: Move switch-symlinks to (guix build utils), bokr, 2022/06/03
- Re: Move switch-symlinks to (guix build utils), Maxime Devos, 2022/06/04
- Re: Move switch-symlinks to (guix build utils), Arun Isaac, 2022/06/06
- Re: Move switch-symlinks to (guix build utils), Maxime Devos, 2022/06/06
- Re: Move switch-symlinks to (guix build utils), Arun Isaac, 2022/06/08