[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26544: [PATCH v4 06/10] scripts: Make boot-parameters label include
From: |
Danny Milosavljevic |
Subject: |
bug#26544: [PATCH v4 06/10] scripts: Make boot-parameters label include generation number and time. |
Date: |
Sat, 22 Apr 2017 22:32:42 +0200 |
On Fri, 21 Apr 2017 14:37:10 +0200
Danny Milosavljevic <address@hidden> wrote:
> (define (system->boot-parameters system number time)
> (unless-file-not-found
> - (let* ((params (read-boot-parameters-file system)))
> - params)))
> + (let* ((params (read-boot-parameters-file system))
> + (label (boot-parameters-label params)))
> + (boot-parameters
> + (inherit params)
> + (label (string-append label " (#"
> + (number->string number) ", "
> + (seconds->string time) ")"))))))
Every time I see that I wonder whether I don't make some other part (like
read-boot-parameters-file or something) to do the label extension. In theory
that would be nicer than fixing it up later - I do the latter here.
And on first sight, one might be able to do that for the old generations
(because the timestr in the label is just the mtime of the system directory).
But the label should also contain the generation number - which is currently
usually being extracted by the procedure "generation-numbers" for an entire
profile (but the caller of system also is able to override the generation
numbers of profile-boot-parameters and profile-grub-entries - not sure why); I
don't find generation-numbers exactly straightforward - I'd rather not mess
with it. Also, the caller zips the result together with SYSTEMS somehow and it
would be easy for me to mess up the association.
Therefore, I opted for this version - which is a lot less risky.
If someone is more familiar with generation-numbers and knows why it's possible
to override the generation numbers (usually by a one-element list), please feel
free to post a patch that integrates this part into read-boot-parameters-file
later.
Note: The current generation doesn't need its label extended.
- bug#26544: [PATCH v4 03/10] system: Factorize operating-system-boot-parameters-file., (continued)
- bug#26544: [PATCH v4 03/10] system: Factorize operating-system-boot-parameters-file., Danny Milosavljevic, 2017/04/22
- bug#26544: [PATCH v4 04/10] system: Introduce operating-system-kernel-arguments and use it., Danny Milosavljevic, 2017/04/21
- bug#26544: [PATCH v4 05/10] system: Introduce read-boot-parameters-file., Danny Milosavljevic, 2017/04/21
- bug#26544: [PATCH v4 08/10] system: Use operating-system-boot-parameters directly., Danny Milosavljevic, 2017/04/21
- bug#26544: [PATCH v4 09/10] system: grub: Use boot-parameters instead of menu-entry where possible., Danny Milosavljevic, 2017/04/21
- bug#26544: [PATCH v4 02/10] system: Rename operating-system-parameters-file to operating-system-boot-parameters-file., Danny Milosavljevic, 2017/04/21
- bug#26544: [PATCH v4 02/10] system: Rename operating-system-parameters-file to operating-system-boot-parameters-file., Danny Milosavljevic, 2017/04/22
- bug#26544: [PATCH v4 01/10] system: Rename operating-system-kernel-arguments to operating-system-user-kernel-arguments., Danny Milosavljevic, 2017/04/21
- bug#26544: [PATCH v4 01/10] system: Rename operating-system-kernel-arguments to operating-system-user-kernel-arguments., Danny Milosavljevic, 2017/04/22
- bug#26544: [PATCH v4 06/10] scripts: Make boot-parameters label include generation number and time., Danny Milosavljevic, 2017/04/21
- bug#26544: [PATCH v4 06/10] scripts: Make boot-parameters label include generation number and time.,
Danny Milosavljevic <=
- bug#26544: [PATCH v4 07/10] system: vm: Use operating-system-kernel-arguments., Danny Milosavljevic, 2017/04/21
- bug#26544: [PATCH v4 10/10] scripts: Remove profile-grub-entries., Danny Milosavljevic, 2017/04/21
- bug#26544: [PATCH v4 10/10] scripts: Remove profile-grub-entries., Mathieu Othacehe, 2017/04/21
- bug#26544: [PATCH v4 10/10] scripts: Remove profile-grub-entries., Danny Milosavljevic, 2017/04/21
- bug#26544: [PATCH v4 10/10] scripts: Remove profile-grub-entries., Mathieu Othacehe, 2017/04/21
- bug#26544: [PATCH v4 00/10] system: Move "--load" and other guix-specific parameters from the grub module to the generic system module., Danny Milosavljevic, 2017/04/22