machine: Add provenance tracking to each machine operating system.
authorLudovic Courtès <ludo@gnu.org>
Sat, 30 Nov 2019 17:42:27 +0000 (18:42 +0100)
committerLudovic Courtès <ludo@gnu.org>
Fri, 6 Dec 2019 23:59:56 +0000 (00:59 +0100)
* gnu/machine.scm (<machine>): Rename accessor to
'%machine-operating-system'.
(machine-operating-system): New procedure.
* doc/guix.texi (Service Reference): Mention it.

doc/guix.texi
gnu/machine.scm

index bd7cb7a..4c2ecd4 100644 (file)
@@ -27129,8 +27129,8 @@ comparison less trivial.
 @end quotation
 
 This service is automatically added to your operating system
-configuration when you use @command{guix system reconfigure} or
-@command{guix system init}.
+configuration when you use @command{guix system reconfigure},
+@command{guix system init}, or @command{guix deploy}.
 @end defvr
 
 @node Shepherd Services
index 05b03b2..b342fe2 100644 (file)
   make-machine
   machine?
   this-machine
-  (operating-system machine-operating-system) ; <operating-system>
+  (operating-system %machine-operating-system); <operating-system>
   (environment      machine-environment)      ; symbol
   (configuration    machine-configuration     ; configuration object
                     (default #f)))            ; specific to environment
 
+(define (machine-operating-system machine)
+  "Return the operating system of MACHINE."
+  (operating-system-with-provenance
+   (%machine-operating-system machine)))
+
 (define (machine-display-name machine)
   "Return the host-name identifying MACHINE."
   (operating-system-host-name (machine-operating-system machine)))