[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Specifying package patches in a more convenient form
From: |
Ludovic Courtès |
Subject: |
Re: Specifying package patches in a more convenient form |
Date: |
Thu, 07 Apr 2016 23:54:49 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Alex Kost <address@hidden> skribis:
> Eric Bavier (2016-04-06 17:57 +0300) wrote:
>
>> On Wed, 06 Apr 2016 15:13:47 +0300
>> Alex Kost <address@hidden> wrote:
> [...]
>>> > + "1lgghck46p33z3hg8dnl76jryig4fh6d8rhzms837zp7x4hyfkv4"))
>>> > + (patches (map search-patch
>>> > '("ttfautohint-source-date-epoch.patch")))))
>>>
>>> Since it's just a single patch, I don't see a reason to use 'map' here.
>>
>> Just that it's less to change if more patches are added later. The
>> same has been used in other packages.
>
> I strongly disagree with this policy.
I think “strongly” and “policy” are a bit… too strong. ;-)
> More patches may never be added, but mapping through a list of a
> single element looks redundant for me.
>
> Talking about how we specify package patches currently, I think it would
> be better to do it in a more clean and general way. What about adding
> the following macro to (gnu packages)?
>
> (define-syntax-rule (search-patches file-name ...)
> "Return a list of patches for each FILE-NAME."
> (list (search-patch file-name) ...))
>
> So instead of things like this:
>
> (list (search-patch "foo.patch")
> (search-patch "bar.patch"))
>
> or this:
>
> (map search-patch '("foo.patch"
> "bar.patch"))
>
> we'll have:
>
> (search-patches "foo.patch"
> "bar.patch")
I like it!
> P.S. Actually, I don't like 'search-patches' name. Better ideas?
No! I like it.
Andy Wingo <address@hidden> skribis:
> What if the "patches" field just applied `search-path' to each of the
> items in the list if the path is not absolute? Use
> `absolute-file-name?' to check if this is needed or not.
FWIW I have a preference for keeping things explicit.
Thanks!
Ludo’.
- [PATCH 7/9] gnu: Add font-fantasque-sans., (continued)
- [PATCH 7/9] gnu: Add font-fantasque-sans., ericbavier, 2016/04/06
- [PATCH 9/9] gnu: fontforge: Install 'showttf' tool., ericbavier, 2016/04/06
- [PATCH 8/9] gnu: fontforge: Use modify-phases., ericbavier, 2016/04/06
- Re: [PATCH 1/9] gnu: Add ttfautohint., Alex Kost, 2016/04/06
- Re: [PATCH 1/9] gnu: Add ttfautohint., Eric Bavier, 2016/04/06
- Specifying package patches in a more convenient form, Alex Kost, 2016/04/07
- Re: Specifying package patches in a more convenient form, Andy Wingo, 2016/04/07
- Re: Specifying package patches in a more convenient form, Eric Bavier, 2016/04/07
- Re: Specifying package patches in a more convenient form, Alex Kost, 2016/04/08
- Re: Specifying package patches in a more convenient form, Ludovic Courtès, 2016/04/09
- Re: Specifying package patches in a more convenient form,
Ludovic Courtès <=
- Re: Specifying package patches in a more convenient form, Alex Kost, 2016/04/09
- Re: Specifying package patches in a more convenient form, Andreas Enge, 2016/04/09
- Re: Specifying package patches in a more convenient form, Alex Kost, 2016/04/09
- Re: [PATCH 1/9] gnu: Add ttfautohint., Ludovic Courtès, 2016/04/13
Re: [PATCH 1/9] gnu: Add ttfautohint., Ludovic Courtès, 2016/04/13