Hi Yarl,

Yarl <[email protected]> writes:

> Hi,
>
> I have two questions.
>
> First, I wonder why not:
>
> diff --git a/gnu/installer.scm b/gnu/installer.scm
> index adc891e4eb4..d155ea0f0d9 100644
> --- a/gnu/installer.scm
> +++ b/gnu/installer.scm
> @@ -379,7 +379,7 @@ (define* (installer-program #:key dry-run? 
> (guix-for-installer (current-guix)))
>      ;; Initialize gettext support, so that installer messages can be
>      ;; translated.
>      #~(begin
> -        (bindtextdomain "guix" (string-append #$guix "/share/locale"))
> +        (bindtextdomain "guix" (string-append #$guix-for-installer 
> "/share/locale"))
>          (textdomain "guix")
>          (setlocale LC_ALL "")))

Because `(current-guix)` has no locale.

```
> ls $(guix build --expression='((@@ (gnu packages package-management) 
> current-guix))')/share/locale
Updating channel 'guix' from Git repository at 
'https://git.guix.gnu.org/guix.git'...
Computing Guix derivation for 'x86_64-linux'... \
ls: cannot access 
'/gnu/store/7bmmz5ph3a3f6q1ssjgc5mb8fyvli17j-profile/share/locale': No such 
file or directory
⏚ θ92° [ruther:~]└2 1m16s 2 % 
> ls $(guix build --expression='(@@ (gnu packages package-management) 
> guix)')/share/locale        
ar  ca  da  el           en@quot  es  fi  hu  ja  kab  lt  oc  pt     ru  sk  
sv  tr  vi
bn  cs  de  en@boldquot  eo       fa  fr  it  ka  ko   nl  pl  pt_BR  si  sr  
ta  uk  zh_CN
⏚ θ72° [ruther:~]└2 % 
> 
``` 

>  
> Second, I wonder how good or bad, feasible/easy or not to cut every
> other references to (@ (gnu packages package-management) guix). See
> `guix gc -R xxx-image.iso | grep guix-1.5`.
>
> I can only think of another one:
>
> The use of 'examples/bare-bones.tmpl'
> (https://codeberg.org/guix/guix/src/commit/83274a1d4c6d51c399d1b86ba1398e7e73605fbf/gnu/system/install.scm#L456)
> which brings `guix-service-type` which uses this aforementioned guix.
>
> The purpose of this is explained below in this file in a comment before
> the `gc-root-service-type`:
>
>> ;; Keep a reference to BARE-BONES-OS to make sure it can be
>> ;; installed without downloading/building anything.  Also keep the
>> ;; things needed by 'profile-derivation' to minimize the amount of
>> ;; download.
>
> So, the real use for keeping a reference to `bare-bones-os`, IIUC, is
> for the final phase of the installer, when `guix system init` is run,
> with a configuration generated that uses `%base-service`
> (https://codeberg.org/guix/guix/src/commit/83274a1d4c6d51c399d1b86ba1398e7e73605fbf/gnu/installer/services.scm#L213)
> which brings `guix-service-type` which uses this aforementioned guix...

Yes, the bare bones os is referenced to keep as much in the /gnu/store
and not have to redownload on minimal OS.

>
> Replacing guix with (current-guix) in `bare-bones-os` is easy, it's not
> that easy for the other part I guess.
>
> Currently, when booting the installed system, you end up with a `guix
> describe` commit being older than `guix system describe`, which might
> seem odd.

I do not think this is about easy or not easy, it is about desirable or not.
I would claim it is not desirable to have a system with (current-guix)
for the regular user. Using current-guix in your system is painful,
you're going to wait for quite a long time to calculate the derivation.
And from time to time to build it, since it will not be substituable.

The easiest way would be setting the default of guix in
guix-service-type to `(current-guix)`, that would ensure the operating
system being the same even after the user boots new system and
reconfigures, which is the most consistent I would say. But it would
make Guix OS experience a lot worse.

I have made a proposal some time ago
https://codeberg.org/guix/guix/issues/4716 that could be extended to
copying the Guix to the installed system which would ensure the user
does not have to pull for initial reconfigure.

Solving https://codeberg.org/guix/guix/issues/4889 would make experience
of using current-guix smoother and maybe at that point it would be
worthwhile considering replacing it in the default operating system. On
the other hand one could also argue that using a pinned package is safer
since it's typically tested by the one doing the bump. (or at least one
would like to believe so) And we know that the tests ran on it and
passed, unlike with the current-guix where the tests do not run.

Rutherther

>
> All this might not be that important and worth the effort?
>
> WDYT?
>
> Thanks.
>
> yarl

Reply via email to