[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guix-package --roll-back
From: |
Nikita Karetnikov |
Subject: |
Re: guix-package --roll-back |
Date: |
Wed, 16 Jan 2013 16:34:42 -0500 |
Hi,
I changed 'roll-back', but didn't add the command-line option. Could
you add it?
Why do these lines raise the "non-literal format string" warning?
+ (format (current-error-port)
+ "error: '~a' is not a valid profile~%"
+ profile)
Also, is it possible to remove nested if statements?
+ (if (= number 0)
+ (format (current-error-port)
+ "error: '~a' is not a valid profile~%"
+ profile)
+ (if (file-exists? previous-profile)
+ (switch-link)
+ (format (current-error-port)
+ (string-append "error: previous profile doesn't exist; "
+ "not rolling back~%"))))))
> I think it works even if PROFILE is not an absolute file name, no?
Maybe I misunderstood, but the following doesn't work.
scheme@(guile-user)> (define %current-profile
"/nix/var/nix/profiles/per-user/root/guix-profile")
scheme@(guile-user)> (profile-number %current-profile)
$1 = 1
scheme@(guile-user)> (profile-number (basename %current-profile))
$2 = 0
Nikita
guix-package.diff
Description: Text Data
pgpx4drJ9MWmr.pgp
Description: PGP signature
- Re: guix-package --roll-back, (continued)
- Re: guix-package --roll-back, Ludovic Courtès, 2013/01/03
- Re: guix-package --roll-back, Nikita Karetnikov, 2013/01/04
- Re: guix-package --roll-back, Ludovic Courtès, 2013/01/05
- Re: guix-package --roll-back, Nikita Karetnikov, 2013/01/09
- Re: guix-package --roll-back, Nikita Karetnikov, 2013/01/10
- Re: guix-package --roll-back, Ludovic Courtès, 2013/01/10
- Re: guix-package --roll-back, Nikita Karetnikov, 2013/01/11
- Re: guix-package --roll-back, Ludovic Courtès, 2013/01/11
- Re: guix-package --roll-back, Nikita Karetnikov, 2013/01/12
- Re: guix-package --roll-back, Ludovic Courtès, 2013/01/13
- Re: guix-package --roll-back,
Nikita Karetnikov <=
- Re: guix-package --roll-back, Ludovic Courtès, 2013/01/17
- Re: guix-package --roll-back, Nikita Karetnikov, 2013/01/21
- Re: guix-package --roll-back, Ludovic Courtès, 2013/01/22