From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 +GT0MEgQKGVBPgEA9RJhRA:P1 (envelope-from ) for ; Thu, 12 Oct 2023 17:27:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id +GT0MEgQKGVBPgEA9RJhRA (envelope-from ) for ; Thu, 12 Oct 2023 17:27:04 +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 A36103CE0A for ; Thu, 12 Oct 2023 17:27:04 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ADxXdRWz; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697124424; a=rsa-sha256; cv=none; b=RDM0td6214mM5k+zBI/DSPAl7UO1jRma7qqerShYK51EA39WIYLNd3jC4uPJsZ9zJmU/Gw w3EiqcPASrBMslLcCS7b/NvnEDSa6W0Gi+tgSmm63/yVK5pw5rsYdkuvlYYnnTHSIecKjx /iX7h6lcQqifmx0GL5MoNHInvFsKkrDDYZ9dEX0W9WVeIAYa78JYlgz0UTltmVzXRp1dRP +ssDwb1/IoKoYfhIDPwKB0OOMXa12Fs9c9yWg9mlRMLM8f/MEhUR2IPtw+1p43YGJjWc/J w1ESrMOQDSPaV7Kp2nePExwvn65T4Ial1m0KZy2mSlAgKO+usYtEgRDYhjpgdQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ADxXdRWz; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697124424; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=GZI+Q9KxFJWe+5N5SqbPxjfAnIX0M/ELUyLEEy03h2I=; b=grSiVfZxZpssCDhQ0f2N3JkBoihzb3NgrO/++w0C0cq/o249TGb+a5W5uU8V/0zCNUnxhR rH2JN72OV7eRXqE4vjIm9irwkpvJEpkQ+QeYZ7bjJfxh3Qr84W01Ty8w8t8etdZRikhHj3 aorIMr4gG7pw0X/2Jrj0nvaLUn+oXCPbC0dUx2R7Pzx3bWlYlV1lE64E0pW0U/sB9fc2Vk ahbB3BhTytuNELrDQlSp30ol+V9SuOBmAcZ0+aayLlKSmZH40HuQAqbo0/6zfg7yXJejFK mqloioD9XOojJGzSeT2+qnaNbr1yDrhXR/+UjcAITnWkjD2naLgZLgmU9za3YQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqxaD-0003nr-Bt; Thu, 12 Oct 2023 11:26:41 -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 1qqxaB-0003nh-Hi for bug-guix@gnu.org; Thu, 12 Oct 2023 11:26:39 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqxaB-0006JT-8n for bug-guix@gnu.org; Thu, 12 Oct 2023 11:26:39 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqxaX-0006hz-MT for bug-guix@gnu.org; Thu, 12 Oct 2023 11:27:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#64858: ~guix shell -C -f guix.scm =?UTF-8?Q?=E2=80=A6~?= should not always need ~--rebuild-cache~ option to build the expected environment. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 12 Oct 2023 15:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64858 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Pierre-Henry =?UTF-8?Q?Fr=C3=B6hring?= Cc: 64858@debbugs.gnu.org Received: via spool by 64858-submit@debbugs.gnu.org id=B64858.169712438925742 (code B ref 64858); Thu, 12 Oct 2023 15:27:01 +0000 Received: (at 64858) by debbugs.gnu.org; 12 Oct 2023 15:26:29 +0000 Received: from localhost ([127.0.0.1]:44121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqxa1-0006h7-5p for submit@debbugs.gnu.org; Thu, 12 Oct 2023 11:26:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqxZy-0006gu-3s for 64858@debbugs.gnu.org; Thu, 12 Oct 2023 11:26:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqxZW-0006Cd-9Q; Thu, 12 Oct 2023 11:25:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=GZI+Q9KxFJWe+5N5SqbPxjfAnIX0M/ELUyLEEy03h2I=; b=ADxXdRWze6rwNUhm3Ung j6+jn62YXme427R7vIvvxva8lD2wYu7YMaMjw8zLxr4Sf7VDfIsa1dUJA6+v7Cb5Lakm4RDqs6NZF k3cw+LQF9dkneUb0IC2WBMbL/Gbd7S6uU66RGOEL/mjFMBOuh53/cyY323DD0P8M2rUbWSCCBYITB DryC5aWH1i97Eo720j3RoMu1kGszJji8Fux14l8S3JIfZ7KS0PujM/6c47EDqKI5lBh14ZwR1dtB+ nKjZqKFWPur05swbmLfPpXiyBiEBvUZVORliNVmSj5XF33KG1jM+0GmyHK9QuMauDXyVYIxbZNYqk WdIUnj72PSmbFA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: ("Pierre-Henry =?UTF-8?Q?Fr=C3=B6hring?="'s message of "Tue, 25 Jul 2023 16:01:32 +0200") References: Date: Thu, 12 Oct 2023 17:25:55 +0200 Message-ID: <8734yflv5o.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -6.91 X-Spam-Score: -6.91 X-Migadu-Queue-Id: A36103CE0A X-TUID: dWJqKVtfRqai Hi Pierre-Henry, Pierre-Henry Fr=C3=B6hring skribis: > $ guix shell -C -f guix.scm ripgrep fd coreutils emacs [...] > This very file (~pkgex.el.org~) is updated with this content then the > package is > built again. > > #+begin_example > $ make build # equivalent to: guix build -f guix.scm > =E2=80=A6 > /gnu/store/8k18bghzcijbps8kix3wqp34x4smfc5l-pkgex-1 > #+end_example > > > ** pkgex-1 -> /gnu/store/0yk3xz85=E2=80=A6 > > Unexpectedly, the package linked from within the container using the same > command as above is not updated, we observe: I don=E2=80=99t fully understand the setup, but I can at least explain what= you can expect. When using =E2=80=98-f guix.scm=E2=80=99, =E2=80=98guix shell=E2=80=99 cach= es based on the mtime of =E2=80=98guix.scm=E2=80=99: if =E2=80=98guix.scm=E2=80=99 is modified, then= the cache is invalidated, otherwise the cache is considered up-to-date and used. IIUC, you=E2=80=99re modifying a different file, =E2=80=98pkgex.el.org=E2= =80=99. =E2=80=98guix shell=E2=80=99 does not know about it and thus goes ahead and reuses the previous value. I guess the current behavior is good when you=E2=80=99re doing: guix shell -D -f guix.scm which is the primary use case that comes to mind, but it=E2=80=99s inapprop= riate when doing: guix shell -f guix.scm in cases where =E2=80=98guix.scm=E2=80=99 defines a package with $PWD as it= s source. I guess we could maybe try to special-case that in =E2=80=98profile-cached-gc-root=E2=80=99. Ludo=E2=80=99.