summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-05-10 15:25:59 +0200
committerLudovic Courtès <ludo@gnu.org>2017-05-10 22:09:08 +0200
commit7fd952e05203d975fcb6cdabd2f742ade1b31b66 (patch)
treef4c56daa415e6b8aaf5b9e4f46ae9ab009dc8dfd /guix/scripts
parent30d2397f73d6fa9e77eed70ec6df8afd3b9f5f5e (diff)
scripts: Warn about old distro.
Fixes <http://bugs.gnu.org/25852>. Suggested by Mark H Weaver <mhw@netris.org>. * guix/scripts.scm (%distro-age-warning): New variable. (warn-about-old-distro): New procedure. * guix/scripts/package.scm (process-actions): Call 'warn-about-old-distro'. * guix/scripts/system.scm (process-action): Likewise.
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/package.scm2
-rw-r--r--guix/scripts/system.scm2
2 files changed, 4 insertions, 0 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 92676c2228..1f3f49fc6f 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -859,6 +859,8 @@ processed, #f otherwise."
(manifest-transaction-install step2)))))
(new (manifest-perform-transaction manifest step3)))
+ (warn-about-old-distro)
+
(unless (manifest-transaction-null? step3)
(show-manifest-transaction store manifest step3
#:dry-run? dry-run?)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 2872bcae6b..9c09767508 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -847,6 +847,8 @@ resulting from command-line parsing."
((shepherd-graph)
(export-shepherd-graph os (current-output-port)))
(else
+ (warn-about-old-distro #:suggested-command
+ "guix system reconfigure")
(perform-action action os
#:dry-run? dry?
#:derivations-only? (assoc-ref opts