[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#41182: Profile hooks ignore system and target
From: |
Mathieu Othacehe |
Subject: |
bug#41182: Profile hooks ignore system and target |
Date: |
Tue, 12 May 2020 10:35:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hey Ludo,
> So I’m very much tempted to instead require each hook to take ‘system’
> and ‘#:target’ arguments and pass them to ‘gexp->derivation’. It’ll
> break the API, in case someone out there has custom profile hooks
> (unlikely given that it’s not really documented), but I’d say that’s OK.
>
> Thoughts?
What seems strange to me is that gexp->derivation has target set to
'current by default, so it should use the defined target. Now, that I
look at it, it's using "%current-target-system".
Would it make any difference to switch:
--8<---------------cut here---------------start------------->8---
(target -> (if (eq? target 'current)
(%current-target-system)
target))
--8<---------------cut here---------------end--------------->8---
to
--8<---------------cut here---------------start------------->8---
(target (if (eq? target 'current)
(current-target-system)
(return target)))
--8<---------------cut here---------------end--------------->8---
like for lower-object, gexp->file and gexp->script?
Regarding breaking the profile hooks API, it's fine by me.
Thanks for investigating this,
Mathieu