From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id SJPCOelW1WQ+ggEASxT56A (envelope-from ) for ; Thu, 10 Aug 2023 23:30:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id IB0+OelW1WQCMQAAG6o9tA (envelope-from ) for ; Thu, 10 Aug 2023 23:30:17 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9393C3CA76 for ; Thu, 10 Aug 2023 23:30:17 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691703017; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=Cgx573wkss1auJjIwVlzKBK9yAVI5HchhkOiU78rI+0=; b=ssoI0/WxZgb+M2lLGZX5AxZP20lsjoqJGr9KbWpYbh4cGas+rIXU05O2b0Er7K8HKtr/tF HCZGIKLfA6UyUhwXC11XYjT3qoZ8LUzVq5YYQd4/t2e4VZdKIKSkL9f22m+jeqCDZ3X099 wlj0EPhCNMAD0KC0Id3206zfTkRlPYtCypsueJlNGkAMa6VISKUShT6QqckT6QypA8mX/Q QkvbA3+uyHc79ViY6ZoDII+J7FehHLHeK1jB9FhrWTdvCcxWtNGw3I+TFl66IQ9UozBIWt gFM+1wRztgDH2sDE6yX6wg3V6SQt8h6c+5pzgBWN/vY4qVp6XLE7QB+rqBObdA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1691703017; a=rsa-sha256; cv=none; b=T39IjzRaP8mEaK0P20eNK5EivIKFJjQygpXlWfI8v3F7EyXm8nrBDIWYUzSl0euxWxPNuq WN6rkb6Z+WGsin/0Q/IlHDA+b7gTv44uj7G61J5fIRU+pfxDDUGPThj+lyzHzuMGDR2taC kI76biN9G+DzYgILN12LICTWoRLyDsBSX41k/XyuoFvFRemA+lksZTMx3MFoGUGfyw+oIm fkY/uvb7Hsx53GwVXFFyN/pk61J/A9L1QFg0ogLudSiKnKqv8smQBAWV6yWP852/xTMP0I RoW4YdHTB5n7hpDhQDXMh7kJo0LAnkNBV2aXCCq0isTBhGeMD3YKw8+RNEtBsg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qUDE4-00032c-BO; Thu, 10 Aug 2023 17:29:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUDE0-00032T-S5 for guix-devel@gnu.org; Thu, 10 Aug 2023 17:29:44 -0400 Received: from world.peace.net ([64.112.178.59]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUDDy-0008V2-GC for guix-devel@gnu.org; Thu, 10 Aug 2023 17:29:44 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qUDDq-0000GC-MC; Thu, 10 Aug 2023 17:29:34 -0400 From: Mark H Weaver To: Maxim Cournoyer Cc: Simon Tournier , Tobias Geerinckx-Rice , Guix Devel Subject: Re: The package/inherit trap In-Reply-To: <878raid40b.fsf@netris.org> References: <20230221130600.18932-1-sharlatanus@gmail.com> <20230226004406.6215-1-sharlatanus@gmail.com> <87ilfmhkuh.fsf_-_@gnu.org> <87lekijcwi.fsf@gmail.com> <87v8jixg6u.fsf@gnu.org> <87o7p94yqk.fsf@gmail.com> <87jzzxy6l0.fsf@nckx> <86lek8dbsf.fsf@gmail.com> <87bkl4y0kh.fsf@gmail.com> <86o7p4a1yt.fsf@gmail.com> <0F2AA797-A329-4E6D-924E-AF5AB9F89064@tobias.gr> <86v8jb8vby.fsf@gmail.com> <87h6pbojgn.fsf@netris.org> <87sf8uewz7.fsf@gmail.com> <878raid40b.fsf@netris.org> Date: Thu, 10 Aug 2023 17:27:24 -0400 Message-ID: <875y5md1uw.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=64.112.178.59; envelope-from=mhw@netris.org; helo=world.peace.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 9393C3CA76 X-Migadu-Scanner: mx1.migadu.com X-Spam-Score: -3.95 X-Migadu-Spam-Score: -3.95 X-TUID: VdMwmmJRf+YD 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