guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] system: grub: Introduce foreign-menu-entry.


From: Chris Marusich
Subject: Re: [PATCH] system: grub: Introduce foreign-menu-entry.
Date: Wed, 03 Aug 2016 23:43:22 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Tomáš Čech <address@hidden> writes:

> I'd like to store configuration of other linux distribution and so far
> I haven't found how to override hardcoded bzImage suffix.
>
> With this change I can have configuration:
>
> (bootloader (grub-configuration
>             (device "/dev/sda")
>             (menu-entries
>              (list
>               (foreign-menu-entry
>                (label "openSUSE")
>                (device "(hd0,1)")
>                (linux "/vmlinuz")
>                (linux-arguments (list
>                                  "root=/dev/venom/opensuse"
>                                  "init=/usr/lib/systemd/systemd"))
>                (initrd "/initrd")
>                )))))
>
> which will transform to:
>
> menuentry "openSUSE" {
>  linux (hd0,1)/vmlinuz root=/dev/venom/opensuse init=/usr/lib/systemd/systemd
>  initrd (hd0,1)/initrd
> }

I see!  Yes, I agree it would be nice to be able to do that.

> My intention was to introduce new record type to distinguish between
> menu-entry and foreign-menu-entry later in the code. Different type,
> different interpretation.

I see what you're saying, but I think the alternative which Ludo
proposed in the following bug report is cleaner because it re-uses the
existing record type:

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20067

What do you think?

> Code was using match-lambda so defining new type to distinguish the
> cases seemed to me natural. Again, I'm new to Guile and I'd like to
> see how to do that right. This worked for me as first solution.

That's totally understandable.  I'm new to Guile, also, so I might not
always be right, either.  Thank you for taking the time to submit a
patch to improve the project!

-- 
Chris

Attachment: signature.asc
Description: PGP signature


reply via email to

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