From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZzZS-0002Yt-IT for guix-patches@gnu.org; Thu, 20 Dec 2018 09:45:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZzZP-0004gr-Ch for guix-patches@gnu.org; Thu, 20 Dec 2018 09:45:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:51367) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZzZP-0004gW-7Y for guix-patches@gnu.org; Thu, 20 Dec 2018 09:45:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gZzZO-0003ZR-UV for guix-patches@gnu.org; Thu, 20 Dec 2018 09:45:02 -0500 Subject: [bug#33806] [PATCH] system: 'kernel->boot-label' now accepts inferior packages. References: Resent-Message-ID: MIME-Version: 1.0 From: Date: Thu, 20 Dec 2018 14:44:05 +0000 (GMT) In-Reply-To: <87zht1rxjb.fsf@gnu.org> Content-Type: multipart/mixed; boundary="----------=_1545317045-5860-1" Message-Id: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 33806 <33806@debbugs.gnu.org> This is a multi-part message in MIME format... ------------=_1545317045-5860-1 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Ok, I've updated the patch, thanks. On Wed, 19 Dec 2018 22:56:08 +0100, Ludovic Court=C3=A8s wro= te: > Hello, >=20 > skribis: >=20 > > From 6c0bbaa0a73f4c6043211df6af100877dc9a4094 Mon Sep 17 00:00:00 2001 > > From: Pkill -9 > > Date: Wed, 19 Dec 2018 20:22:20 +0000 > > Subject: [PATCH] system: 'kernel->boot-label' now accepts inferior pack= ages. > > > > * gnu/system.scm (kernel->boot-label): Get package name and version > > using the functions for inferior packages if the kernel is not a > > regular package. >=20 > [...] >=20 > > (define (kernel->boot-label kernel) > > "Return a label for the bootloader menu entry that boots KERNEL." > > - (string-append "GNU with " > > - (string-titlecase (package-name kernel)) " " > > - (package-version kernel) > > - " (beta)")) > > + (if (package? kernel) > > + (string-append "GNU with " > > + (string-titlecase (package-name kernel)) " " > > + (package-version kernel) > > + " (beta)") > > + (string-append "GNU with " > > + (string-titlecase (inferior-package-name kernel)) > > + (inferior-package-version kernel) > > + " (beta)"))) >=20 > I=E2=80=99d suggest writing it as: >=20 > (cond ((package? kernel) =E2=80=A6) > ((inferior-package? kernel) =E2=80=A6) > (else "GNU")) >=20 > Could you send an updated patch? >=20 > Of course this is also where we start wondering whether and > should simply inherit from a common class of which > =E2=80=98package-name=E2=80=99 would be a method=E2=80=A6 >=20 > In this case I think it=E2=80=99s OK to do things this way, especially be= cause > the kernel could also be a non-package file-like object. >=20 > Thanks, > Ludo=E2=80=99. ------------=_1545317045-5860-1 Content-Type: text/x-patch; name="=?UTF-8?Q?0001-system-kernel-boot-label-now-accepts-inferior-packag.patch?=" Content-Disposition: attachment; filename="=?UTF-8?Q?0001-system-kernel-boot-label-now-accepts-inferior-packag.patch?=" Content-Transfer-Encoding: base64 Content-ID: <65653c356c0f7510cb2f4a8a19b96ce9> RnJvbSAwZTg2YzA3MDhmM2FhMGViMzVhOWZjM2M5ZWY4OWRjYjIxMGJhYzNm IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQa2lsbCAtOSA8cGtp bGw5QHJ1bmJveC5jb20+CkRhdGU6IFdlZCwgMTkgRGVjIDIwMTggMjA6MjI6 MjAgKzAwMDAKU3ViamVjdDogW1BBVENIXSBzeXN0ZW06ICdrZXJuZWwtPmJv b3QtbGFiZWwnIG5vdyBhY2NlcHRzIGluZmVyaW9yIHBhY2th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W50cnkgdGhh dCBib290cyBLRVJORUwuIgotICAoc3RyaW5nLWFwcGVuZCAiR05VIHdpdGgg IgotICAgICAgICAgICAgICAgICAoc3RyaW5nLXRpdGxlY2FzZSAocGFja2Fn ZS1uYW1lIGtlcm5lbCkpICIgIgotICAgICAgICAgICAgICAgICAocGFja2Fn ZS12ZXJzaW9uIGtlcm5lbCkKLSAgICAgICAgICAgICAgICAgIiAoYmV0YSki KSkKKyAgKGNvbmQgKChwYWNrYWdlPyBrZXJuZWwpCisgICAgICAgICAgIChz dHJpbmctYXBwZW5kICJHTlUgd2l0aCAiCisgICAgICAgICAgICAgICAgICAg ICAgICAgIChzdHJpbmctdGl0bGVjYXNlIChwYWNrYWdlLW5hbWUga2VybmVs KSkgIiAiCisgICAgICAgICAgICAgICAgICAgICAgICAgIChwYWNrYWdlLXZl cnNpb24ga2VybmVsKQorICAgICAgICAgICAgICAgICAgICAgICAgICAiIChi ZXRhKSIpKQorICAgICAgICAoKGluZmVyaW9yLXBhY2thZ2U/IGtlcm5lbCkK KyAgICAgICAgICAgKHN0cmluZy1hcHBlbmQgIkdOVSB3aXRoICIKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgKHN0cmluZy10aXRsZWNhc2UgKGluZmVy aW9yLXBhY2thZ2UtbmFtZSBrZXJuZWwpKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAoaW5mZXJpb3ItcGFja2FnZS12ZXJzaW9uIGtlcm5lbCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgIiAoYmV0YSkiKSkKKyAgICAgICAg KGVsc2UgIkdOVSIpKSkKIAogKGRlZmluZSAoc3RvcmUtZmlsZS1zeXN0ZW0g ZmlsZS1zeXN0ZW1zKQogICAiUmV0dXJuIHRoZSBmaWxlIHN5c3RlbSBvYmpl Y3QgYW1vbmcgRklMRS1TWVNURU1TIHRoYXQgY29udGFpbnMgdGhlIHN0b3Jl LiIKLS0gCjIuMTkuMgoK ------------=_1545317045-5860-1--