[Top][All Lists]

[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


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 
scheme@(guile-user)> (profile-number %current-profile)
$1 = 1
scheme@(guile-user)> (profile-number (basename %current-profile))
$2 = 0


Attachment: guix-package.diff
Description: Text Data

Attachment: pgpx4drJ9MWmr.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]