guix-patches
[Top][All Lists]
Advanced

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

[bug#33806] [PATCH] system: 'kernel->boot-label' now accepts inferior pa


From: pkill9
Subject: [bug#33806] [PATCH] system: 'kernel->boot-label' now accepts inferior packages.
Date: Thu, 20 Dec 2018 14:44:05 +0000 (GMT)

Ok, I've updated the patch, thanks.


On Wed, 19 Dec 2018 22:56:08 +0100, Ludovic Courtès <address@hidden> wrote:

> Hello,
> 
> <address@hidden> skribis:
> 
> > From 6c0bbaa0a73f4c6043211df6af100877dc9a4094 Mon Sep 17 00:00:00 2001
> > From: Pkill -9 <address@hidden>
> > Date: Wed, 19 Dec 2018 20:22:20 +0000
> > Subject: [PATCH] system: 'kernel->boot-label' now accepts inferior packages.
> >
> > * 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.
> 
> [...]
> 
> >  (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)")))
> 
> I’d suggest writing it as:
> 
>   (cond ((package? kernel) …)
>         ((inferior-package? kernel) …)
>         (else "GNU"))
> 
> Could you send an updated patch?
> 
> Of course this is also where we start wondering whether <package> and
> <inferior-package> should simply inherit from a common class of which
> ‘package-name’ would be a method…
> 
> In this case I think it’s OK to do things this way, especially because
> the kernel could also be a non-package file-like object.
> 
> Thanks,
> Ludo’.


Attachment: 0001-system-kernel-boot-label-now-accepts-inferior-packag.patch
Description: Text Data


reply via email to

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