bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25917: [PATCH] file-systems: Factorize file-system-packages.


From: Ludovic Courtès
Subject: bug#25917: [PATCH] file-systems: Factorize file-system-packages.
Date: Sat, 18 Mar 2017 12:00:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hello!

Danny Milosavljevic <address@hidden> skribis:

> On Fri, 17 Mar 2017 10:03:52 +0100
> address@hidden (Ludovic Courtès) wrote:
>
>> You can also remove the now-unused ‘file-system-type-predicate’
>> procedure that is in ‘base-initrd’.
>
> It's still used there (in order to determine the Linux modules).  Should I 
> also export 'file-system-type-predicate` from file-systems.scm and use that 
> in 'base-initrd` ?  I thought it was too special-case to be a public function.
>
> Also, it seems that the new version (which now uses 
> `set-path-environment-variable') clears the old PATH whereas the previous 
> version prepended to it.
>
> The previous version has:
>
>                              (setenv "PATH"
>                                      (string-append
>                                       #$e2fsprogs "/sbin:"
>                                       "/run/current-system/profile/sbin:"
>                                       $PATH)))
>
> (What does "$" without "#" do?)

#$ is synonymous for ‘ungexp’; $ alone has no special meaning, and $PATH
is a regular identifier.

> The new version would have:
>
>                            (lambda ()
>                              (set-path-environment-variable "PATH"
>                                                             '("bin" "sbin")
>                                                             '#$packages))
>
> It works fine - however, I get a warning that PATH has been unset at bootup.

You could shut it up like this:

  ;; Don’t display the PATH settings.
  (with-output-to-port (%make-void-port "w")
    (lambda ()
      (set-path-environment-variable …)))

> What's up with the hard-coded "/run/current-system/profile/sbin" ?

I traced it back to 1b09031f786238b21ab10ba4c3e384ab194735df.  I think
you can remove it (probably the idea was that we were “likely” to find
other fsck commands in /run/current-system/profile/sbin, not very
reliable…).

HTH!

Ludo’.





reply via email to

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