all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: Simon Tournier <zimon.toutoune@gmail.com>,
	Tobias Geerinckx-Rice <me@tobias.gr>,
	Guix Devel <guix-devel@gnu.org>
Subject: Re: The package/inherit trap
Date: Thu, 10 Aug 2023 17:27:24 -0400	[thread overview]
Message-ID: <875y5md1uw.fsf@netris.org> (raw)
In-Reply-To: <878raid40b.fsf@netris.org>

Hello again,

I made a mistake in my previous message.

Earlier, I wrote:
> Consider 'kodi/wayland' as an example:
>
> __ (define-public kodi/wayland
> ____ (package
> ______ (inherit kodi)
> ______ (name "kodi-wayland")
> ______ (arguments
> _______ (substitute-keyword-arguments (package-arguments kodi)
> _________ ((#:configure-flags flags)
> __________ `(cons "-DCORE_PLATFORM_NAME=wayland"
> _________________ (delete "-DCORE_PLATFORM_NAME=x11" ,flags)))))
> ______ (inputs
> _______ (modify-inputs (package-inputs kodi)
> _________ (prepend libinput
> __________________ libxkbcommon
> __________________ waylandpp
> __________________ wayland-protocols)))
> ______ (synopsis "Kodi with Wayland rendering backend")))
>
> Suppose, at some future time, 'kodi' were given a replacement named
> 'kodi-with-fixes' to apply a security update.
>
> The question to ask yourself is this: would it make sense for
> 'kodi/wayland' to automatically be given a replacement field defined
> exactly as above except with (inherit kodi) changed to (inherit
> kodi-with-fixes)?

The above paragraph isn't quite right.  It should be:

> The question to ask yourself is this: would it make sense for
> 'kodi/wayland' to automatically be given a replacement field defined
> exactly as above except with all free references to 'kodi' within the
> 'package' (or 'package/inherit') form changed to 'kodi-with-fixes'?

Alternatively, for the sake of those who don't know what it means for a
variable reference to be "free" within a given expression, here's
another way to write it:

> The question to ask yourself is this: would it make sense for
> 'kodi/wayland' to automatically be given a replacement field defined
> exactly as above except with the 'package' (or 'package/inherit') form
> wrapped within (let ((kodi kodi-with-fixes)) ...).

This point is crucial.  Observe that in the 'kodi/wayland' definition,
the OVERRIDES for the 'arguments' and 'inputs' fields are defined as
incremental changes to (package-arguments kodi) and (package-inputs
kodi), respectively.

In order for (package/inherit BASE OVERRIDES ...) to work as intended,
the incremental changes made in OVERRIDES should be based upon the
variable BASE, because that is the only variable that will be rebound to
(package-replacement BASE) when automatically producing the replacement
for the derived package.

      Regards,
        Mark


  reply	other threads:[~2023-08-10 21:30 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 13:06 [bug#61674] [PATCH 0/4] gnu: stellarium: Enable ShowMySky Sharlatan Hellseher
2023-02-21 13:07 ` [bug#61674] [PATCH 1/4] gnu: Add calcmysky Sharlatan Hellseher
2023-02-21 13:07   ` [bug#61674] [PATCH 2/4] gnu: qxlsx: Use Qt6 Sharlatan Hellseher
2023-02-21 13:07   ` [bug#61674] [PATCH 3/4] gnu: Add qxlsx-qt5 Sharlatan Hellseher
2023-02-21 13:07   ` [bug#61674] [PATCH 4/4] gnu: stellarium: Enable ShowMySky Sharlatan Hellseher
2023-02-26  0:37 ` [bug#61674] Sharlatan Hellseher
2023-02-26  0:44 ` [bug#61674] [PATCH 1/4] gnu: Add calcmysky Sharlatan Hellseher
2023-02-26  0:44   ` [bug#61674] [PATCH 2/4] gnu: qxlsx: Use Qt6 Sharlatan Hellseher
2023-02-26  0:44   ` [bug#61674] [PATCH 3/4] gnu: Add qxlsx-qt5 Sharlatan Hellseher
2023-02-27 21:15     ` [bug#61674] [PATCH 0/4] gnu: stellarium: Enable ShowMySky Ludovic Courtès
2023-02-26  0:44   ` [bug#61674] [PATCH 4/4] " Sharlatan Hellseher
2023-02-27 21:15     ` [bug#61674] [PATCH 0/4] " Ludovic Courtès
2023-02-26  2:55   ` [bug#61674] [PATCH 1/4] gnu: Add calcmysky Leo Famulari
2023-02-27 21:14   ` [bug#61674] [PATCH 0/4] gnu: stellarium: Enable ShowMySky Ludovic Courtès
2023-02-28 10:35     ` Simon Tournier
2023-03-03 10:49       ` Ludovic Courtès
2023-03-03 11:04         ` Simon Tournier
2023-03-03 15:54           ` Maxim Cournoyer
2023-03-03 18:19             ` Simon Tournier
2023-03-04  3:32               ` Maxim Cournoyer
2023-03-04 11:11                 ` Sharlatan Hellseher
2023-03-03 19:21             ` The package/inherit trap (was: gnu: stellarium: Enable ShowMySky.) Tobias Geerinckx-Rice
2023-03-04  3:44               ` The package/inherit trap Maxim Cournoyer
2023-03-07 11:46               ` The package/inherit trap (was: gnu: stellarium: Enable ShowMySky.) Simon Tournier
2023-03-07 16:43                 ` The package/inherit trap Maxim Cournoyer
2023-03-07 17:46                   ` Simon Tournier
2023-03-07 22:11                     ` Tobias Geerinckx-Rice
2023-03-08  9:07                       ` Simon Tournier
2023-07-31 20:17                         ` John Kehayias
2023-08-06 23:10                         ` Mark H Weaver
2023-08-07 14:41                           ` Maxim Cournoyer
2023-08-10 20:40                             ` Mark H Weaver
2023-08-10 21:27                               ` Mark H Weaver [this message]
2023-09-02 18:46                               ` Maxim Cournoyer
2023-08-07  0:00               ` The package/inherit trap (was: gnu: stellarium: Enable ShowMySky.) (
2023-08-07  6:29                 ` Attila Lendvai
2023-08-07 14:43                   ` The package/inherit trap Maxim Cournoyer
2023-02-28  0:12 ` [bug#61674] [PATCH v3 1/4] gnu: Add calcmysky Sharlatan Hellseher
2023-02-28  0:12   ` [bug#61674] [PATCH v3 2/4] gnu: qxlsx: Use Qt6 Sharlatan Hellseher
2023-02-28  0:12   ` [bug#61674] [PATCH v3 3/4] gnu: Add qxlsx-qt5 Sharlatan Hellseher
2023-02-28  0:12   ` [bug#61674] [PATCH v3 4/4] gnu: stellarium: Enable ShowMySky Sharlatan Hellseher
2023-03-07 10:39     ` bug#61674: [PATCH 0/4] " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875y5md1uw.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=guix-devel@gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    --cc=me@tobias.gr \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.