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 +AJNF/XO92SVcQAAG6o9tA:P1 (envelope-from ) for ; Wed, 06 Sep 2023 02:59:33 +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 +AJNF/XO92SVcQAAG6o9tA (envelope-from ) for ; Wed, 06 Sep 2023 02:59:33 +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 208E6418E7 for ; Wed, 6 Sep 2023 02:59:33 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=EzBRFxnn; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693961973; 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: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=BKn2h4oIy9JqYnzcpiyDAwABu0rIVF6JTcXbQBYXbqg=; b=NZhUuUfhHwGmqIcq7JzBy8LXOvDf3FPmOuN6IHJZy/5+qZorKctFpKhJp6cDSqMtOA6hRT 5pTSI6+mJcbujOQWhCb3yGBZrB7bjZVykk7HWFvU0LA+8W/dDJ4jnTPVD+t/QibzqaZfgu f/BtHAvuA/75C7rOCtQUOTY8LP6MvimJJFHCX4wuQySibnCUqlHXTiwoXxKF9a6+MpRmnw SCAZwwohQYiQm5erF76ocxAj8oMRD2dzbzMhTjrNFuR44oonJJQDZBmxeuMiCMMdnpXVxX KIw1I4+VzbMhZ+n7vcAzM1oW0WKKKxAj+UYGvSrTHbiowFitjY5beR29GX4HxQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=EzBRFxnn; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693961973; a=rsa-sha256; cv=none; b=lrWXl6Zq/UVCpn+YltNfyzT5mzww1M7uzRor3xybX73CVADuDLAPy4M/f36V6gC2wzBZ3l 0QMmjsl2CSBnHfqMiEFYsvm5+oJ+nqx8etPHG5aU/8iKSH0MTXGnkJEHnJXwh8/d0QqNo7 IbiL4nFBjvi/KYHsdQTMVFfZ7yd8t89dGwv6D0Vj8hrna3h+sUe/V9uvJrKQToBOX9H9eS bkohTSfeCtFbfw21ZztLIi+ml3ojtTU9QqDlSS2C/FeQD45zPyaTkljb54Cn5fwkmAwNLn 2qL33C12imh7GRAsN2jYGKev8Ap/WKNLtTuN7luN7HJvD8ije9vj3PX4qJEVLA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdgso-0007SD-75; Tue, 05 Sep 2023 20:59:02 -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 1qdgsn-0007OG-El for guix-patches@gnu.org; Tue, 05 Sep 2023 20:59:01 -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 1qdgsn-0008M8-69 for guix-patches@gnu.org; Tue, 05 Sep 2023 20:59:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qdgsn-0004RJ-UQ for guix-patches@gnu.org; Tue, 05 Sep 2023 20:59:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65352] Fix time-machine and network Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Sep 2023 00:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65352 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Maxim Cournoyer Cc: 65352-done@debbugs.gnu.org Received: via spool by 65352-done@debbugs.gnu.org id=D65352.169396191017017 (code D ref 65352); Wed, 06 Sep 2023 00:59:01 +0000 Received: (at 65352-done) by debbugs.gnu.org; 6 Sep 2023 00:58:30 +0000 Received: from localhost ([127.0.0.1]:60167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdgsH-0004QP-JC for submit@debbugs.gnu.org; Tue, 05 Sep 2023 20:58:30 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]:40096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdgsF-0004Q8-N2 for 65352-done@debbugs.gnu.org; Tue, 05 Sep 2023 20:58:28 -0400 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4ffd3c9330dso783070e87.0 for <65352-done@debbugs.gnu.org>; Tue, 05 Sep 2023 17:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693961900; x=1694566700; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BKn2h4oIy9JqYnzcpiyDAwABu0rIVF6JTcXbQBYXbqg=; b=EzBRFxnnuDVJREZRxCx4ucB8QralRy1IauzbSe37Avu3UOBDTXekF+6YvkIeZGZ1rv 7eIyL6Y2hCrvNtri/0FNFyYM+prNBOxq19Mx9b0Sc39TlB8uuEuU7J4ZU/OPsVO4F+8t vSzsmE6BSXxF5DVaSg973X6lwawCTV3kqdch5iEbQ0f11iCJ27AuFuUY41PQox0GEHFk dKNO+l4pBGRooznEjPcuJVNhvDPDlxjAZnDkWtHo+jfILc3BZEh9u5SWjQHwy+P8HgAC /RkKmlxFMAQWkWQlr6f5sWA1W84oZ/yF6Aao14hs2M55sHG6EtIZ5LVrhINmM6UccBuR +ZEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693961900; x=1694566700; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BKn2h4oIy9JqYnzcpiyDAwABu0rIVF6JTcXbQBYXbqg=; b=h43hyVYI40L6p1pI7pbJHi+WM9qwUgUb9U9Zsas6L1UcAflEQPl0rOEHpChZXk1pXP a+8xw3fHB1HMasiGX43gENuTkyTM9XPSK1++noXggar6pninrje1NAJvkI7vGTAHPryd f0sRhPyfIkeCqgkCOQdtri0uUxW2/aDIgHxCQAmphrE/2S4U0LqUy5bH2/2EuMsF2s2s BK3+NsoQSGSWAHHINXl/u7DyUzJoV2HkzH3ooKEYNMh4q3IfnOUGc7/2NZBk8F7vBSwi LW8ztmtfvUShjStp31Tto2v0AMuprBeehIVOv00RbLUXsL5OF21vHJ8b+3UG++9t2vLF nr/A== X-Gm-Message-State: AOJu0YxgHNgdFnE0zzg7jib28XTNGUVu1trGxe0f5crBkKCrwEoyHSzd JYQdGD0HN5jfvjkblFsZ8lan939Y4u118DAgTC8= X-Google-Smtp-Source: AGHT+IEp7IxaEx4UjwGY8ZtDpkBjAW3wd/IpqJVOu0j/4DBm9a70YB7TUYMj2vuegL9CwMBqF8NOZ/kFHXIU5S5elp4= X-Received: by 2002:ac2:5628:0:b0:4f6:a2f:beb with SMTP id b8-20020ac25628000000b004f60a2f0bebmr8715166lff.5.1693961900386; Tue, 05 Sep 2023 17:58:20 -0700 (PDT) MIME-Version: 1.0 References: <87fs4h4vb9.fsf@gmail.com> <87fs3slplq.fsf_-_@gmail.com> <87tts8f9p7.fsf@gmail.com> In-Reply-To: <87tts8f9p7.fsf@gmail.com> From: Simon Tournier Date: Wed, 6 Sep 2023 02:58:08 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 208E6418E7 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: 2.77 X-Spam-Score: 2.77 X-TUID: Z+/dPx90y+4s Hi Maxim, On Wed, 6 Sept 2023 at 02:04, Maxim Cournoyer wrote: > I had indeed missed its continuation! I've reverted a789dd5865 with > 756e336fa0 and installed c3d48d024, which should now validate the > branch/commit of a channel file as well. Thanks for the follow up. The other issue about the order of the progress bar and the message "Updating guix ..." is not yet fixed. :-) I am fine to open another issue for that but since it appears to me the same patch series as this one. Well you are applying patches faster than I am able to process my emails or comment your messages. ;-) Anyway, I will open a report for that order issue. However, this bug #65352 is not done. https://issues.guix.gnu.org/65352#0 The bug I report is, for instance, consider "guix time-machine --commit=v1.4.0", this will pass (tag-or-commit . "v1.4.0") as REF to reference-available? which is not a commit-id? if I read correctly. And so reference-available? will return #f triggered an network update when the reference if already in the cache checkout. It is similar with short commit hash as "guix time-machine --commit=4a027d2". That's what I reported. I am fine with the revert 756e336fa008c2469b4a7317ad5c641ed48f25d6 waiting my fix for what I am reporting. But I disagree with the comment because that's incorrect. In order to detect the tag or commit string, the procedure reference-available? needs to implement the string tag case and the short commit hash case, something like: (('tag-or-commit . str) (cond ((and (string-contains str "-g") (match (string-split str #\-) ((version ... revision g+commit) (if (and (> (string-length g+commit) 4) (string-every char-set:digit revision) (string-every char-set:hex-digit (string-drop g+commit 1))) ;; Looks like a 'git describe' style ID, like ;; v1.3.0-7-gaa34d4d28d. (string-drop g+commit 1) #f)) (_ #f))) => (lambda (commit) (resolve `(commit . ,commit)))) ((or (> (string-length str) 40) (not (string-every char-set:hex-digit str))) (resolve `(tag . ,str))) ;definitely a tag (else (catch 'git-error (lambda () (resolve `(tag . ,str))) (lambda _ ;; There's no such tag, so it must be a commit ID. (resolve `(commit . ,str))))))) which is the same as resolve-reference. ;-) Hence my proposal. I agree with your words: if REF passed to reference-available? is not a valid REF defined by the docstring of update-cached-checkout, it means that the "contract" is broken and so there is a bug. It appears to me inconsistent to allow the clause (_ #f) in reference-available? and not in resolve-reference. Therefore, the change I proposed that is now reverted has just exposed the bug. :-) All in all, this issue should be kept open. Cheers, simon