From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: [PATCH] system: grub: Introduce foreign-menu-entry. Date: Wed, 03 Aug 2016 23:43:22 -0700 Message-ID: <87oa59hw51.fsf@gmail.com> References: <20160803064249.7433-1-sleep_walker@gnu.org> <87eg66kzkr.fsf@gmail.com> <20160803090519.GA14600@venom> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVCNP-0005TQ-81 for guix-devel@gnu.org; Thu, 04 Aug 2016 02:43:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVCNN-00005x-4L for guix-devel@gnu.org; Thu, 04 Aug 2016 02:43:30 -0400 Received: from mail-pa0-x243.google.com ([2607:f8b0:400e:c03::243]:34552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVCNM-000055-T7 for guix-devel@gnu.org; Thu, 04 Aug 2016 02:43:29 -0400 Received: by mail-pa0-x243.google.com with SMTP id hh10so16102405pac.1 for ; Wed, 03 Aug 2016 23:43:28 -0700 (PDT) Received: from garuda ([2601:602:9d00:e745:4e0f:6eff:fef6:70b9]) by smtp.gmail.com with ESMTPSA id q14sm17169550pfi.76.2016.08.03.23.43.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Aug 2016 23:43:26 -0700 (PDT) In-Reply-To: <20160803090519.GA14600@venom> (=?utf-8?B?IlRvbcOhxaEgxIxl?= =?utf-8?B?Y2giJ3M=?= message of "Wed, 3 Aug 2016 11:05:19 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Tom=C3=A1=C5=A1 =C4=8Cech 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=3D/dev/venom/opensuse" > "init=3D/usr/lib/systemd/systemd")) > (initrd "/initrd") > ))))) > > which will transform to: > > menuentry "openSUSE" { > linux (hd0,1)/vmlinuz root=3D/dev/venom/opensuse init=3D/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=3D20067 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! =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXouQMAAoJEN1AmhXYIkadEEkP/i0PKkWj86ngiOgsnrQpRQRv DvgX+SwyGV0WdSxl49yA4SBieDx7d6/o31onRFKal+SMK2Ri0lKwrcEirAuLWf30 bvZVmT6DE0aXg0OUEl6koTRWWTsIA/kdTfP9Kb8zYhcqjVXMR8/9v+aEfCiYSwcg PsE7oGU4DAjFtojZhJDaG4vZz2M0rzMC6NTP72M0nPAE+0FzkG4lPz8vXwxSQFcG fkTZ+x/XbS8uKBhZ8kUIgdqY30u6guR3QZ5t8wosU+VdjE2sGEd5L4OpNNb+Kn+S kM3WcYM/NM/K29nnA0bDYYolNljSyUIesKqENNLFgmwi8qTqQTeLPDeGYJveaqy5 J/1gZIPvLqlCAbLv7FOPFZau2Q8QD4UccRHqK4sQFpqlDiMwwriPQKufUZzlnQi+ bv0fa/+L1amgBUmhSSb7WKyI4LhX0XnUKayCeJ3gjzocd8xFBmIDdcMmLqR0LWmV e69qOyVEcEDjOdj3Z8k+vqCVKl/TU95ZhuPhhXG7mhvl5RRY3ZUhJ8Df3akaGAlg t8Wo8nOLQIE/B6xSSVSTnUtzNTWfu36Ians0wv3BcTKFYe4wv03OOm5IBf0ayPM2 X48hXiCet5GZRsFDK8u0o0+cunjCVAWS3v/O5WqizXwWSULnfmMUj4g/4UkX1QaE hZIHI4wn9nMeaTFpmyeZ =uwrO -----END PGP SIGNATURE----- --=-=-=--