From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id l72rAf1F5mPJggAAbAwnHQ (envelope-from ) for ; Fri, 10 Feb 2023 14:26:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id aFSPO/xF5mMM6QAAG6o9tA (envelope-from ) for ; Fri, 10 Feb 2023 14:26:20 +0100 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 C260AEE7E for ; Fri, 10 Feb 2023 14:26:20 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQTPR-0007bc-1s; Fri, 10 Feb 2023 08:25:49 -0500 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 1pQTPP-0007Z1-7Z for guix-devel@gnu.org; Fri, 10 Feb 2023 08:25:47 -0500 Received: from 1.mo582.mail-out.ovh.net ([46.105.56.136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQTPM-0005TI-Ga for guix-devel@gnu.org; Fri, 10 Feb 2023 08:25:46 -0500 Received: from director8.ghost.mail-out.ovh.net (unknown [10.108.16.222]) by mo582.mail-out.ovh.net (Postfix) with ESMTP id E1A1D25A2D for ; Fri, 10 Feb 2023 13:25:33 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-sqbns (unknown [10.111.172.49]) by director8.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 453581FE51 for ; Fri, 10 Feb 2023 13:25:32 +0000 (UTC) Received: from ngraves.fr ([37.59.142.102]) by ghost-submission-6684bf9d7b-sqbns with ESMTPSA id B45cEMxF5mPg4gAAAtFDNg (envelope-from ) for ; Fri, 10 Feb 2023 13:25:32 +0000 X-OVh-ClientIp: 81.67.140.142 To: guix-devel@gnu.org Subject: avoid Computing Guix derivation when not necessary Date: Fri, 10 Feb 2023 14:25:31 +0100 Message-ID: <87v8k9bqk4.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain X-Ovh-Tracer-Id: 5029676360533533237 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrudehhedgheduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvffufffkgggtsehttdertddttddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepueejleeileejfffhleetjedtleejheevudffleevgfdufeekhefgvddvveegveefnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrddutddvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopehguhhigidquggvvhgvlhesghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekvddpmhhouggvpehsmhhtphhouhht Received-SPF: pass client-ip=46.105.56.136; envelope-from=ngraves@ngraves.fr; helo=1.mo582.mail-out.ovh.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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: , Reply-to: Nicolas Graves From: Nicolas Graves via "Development of GNU Guix and the GNU System distribution." Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676035580; a=rsa-sha256; cv=none; b=LpuHnNcexAxl9oiS+1p7HTlGsKDlGVlgbzUrvDexWr45B3wZj+Jdxh96ZZmK7SP0UDbUju qix5WdIyo9FmonDardGs0jA98B28YiahVNEsPFUz2v1GsHbsCK65ncYVcLkq+JoRMxA3Ed nlediKpy29FTO2TSK23fYtGR9Vvg8xda3yRMWZRCCVn9j3iUdY16ft/cq+7vh/+WSScO8F ol/9xfiQp6KR/o03vd87+f5Zt+VlN8uBGs//W5sMI2ypS9Jp82hXY0aVXHgKCnCzN1s0hl 2WfAXRl7NEk53VQOmfr1hmciNEl+ldU5Ue2SEu7EYMDHI0lIRJ89r67yV0hNOg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676035580; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=OVAoLLlvAKRxcWMnnB5SMMysSKU1RFCzQlY0+u6WNeI=; b=Qe1whAQopiK+jVtiEKbgEigiwNc+cFcuZpZJi+cU3Hyokk8Xq/2GrwvFN6UfDwRAFyYHyP O+Di/OUUgYcJJ+Fk1LD+HN6d7grH2iV6IRk3mKJ66kA8oGfoz5Y6NyaJM3767BLEbh0ZGj X2BqPQRN1sW1TshlTn1ibE/DR4g03NPTfDU3iOK3ns55B5DVFVzL44ZInuw44zGl79cbzL taf5Wn/fZs5pfizh0qGnAWxHzlp67wHYBrUbYvjlkgI87Bo5Y74ERNQSglJq520kC1+3wL RjwjUH42/57VJMqSfbBRLUeNw7VMZHXxI2dCpbH8iwxQXuZIYFWzQXlLs//t7g== X-Spam-Score: -3.41 X-Migadu-Queue-Id: C260AEE7E X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -3.41 X-TUID: bk5NY/0rxk9N Hi guix! I found an working solution to avoid waiting for the `Computing Guix derivation' part when pulling or else. Here's my snippet: ``` (use-modules (git) (guix profiles) (srfi srfi-1)) (reduce (lambda (x y) (and x y)) #f (map (lambda (x) (let* ((elts (cdadar (manifest-entry-properties x))) (repository (repository-open (car (assoc-ref elts 'url)))) (commit (oid->string (object-id (revparse-single repository (car (assoc-ref elts 'branch))))))) (string= commit (car (assoc-ref elts 'commit))))) (manifest-entries (profile-manifest "./.guix-profile/guix")))) ``` For the moment, I'm using a profile and local development directories to avoid this recomputation when I need to run guix system and guix home, but I think this could be included to speed up guix pull when no new commits are found. The principle is simple: get commit and directory info from the profile manifest, compare commits, if commits for all channels are the same, do not try to update the profile. It may not be as interessing for guix pull (need to pull anyway to get the last commit...). If you think this can have some use, I can rework on it for guix ;) -- Best regards, Nicolas Graves