From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id YEtXKnU4u2T54wAASxT56A (envelope-from ) for ; Sat, 22 Jul 2023 04:01:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SHhlKnU4u2RVhAEA9RJhRA (envelope-from ) for ; Sat, 22 Jul 2023 04:01:25 +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 43E10425F7 for ; Sat, 22 Jul 2023 04:01:25 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b="CG/c30Gt"; 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=1689991285; 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=84bt8yTfmKNvfCBcpxsZ9mzm/vcHul3LDpYK5nHUiiM=; b=jPx5iNpci7PPXaP0xaXmU8TegiSW2sm0jamg5vGfp2EZZ5du2CxOgNW6qYnvtdKHFJD8dd n6zY+A9qAcHFAzT2l8Az6FjJZPQ5PjibKkpy7hILCxP7c51KzReqnAfN6JGRT7uhib5Sa9 qoePVE7DnbEYUDbLz5E64I4UupjlySIN/QJzPclR/zd6W7GMQJXi76DjOAHET5Fmkz5DLU V2uHws3N043BrvsBOth7/zbXlP9+PVVS3QxH59KulVyMWlURtoLcvalrORgvG9sL6eukGc 21lm23TswgjAstDz2uxqkh45KcF3/Dbs03VObQ5h6pAgxq866WbeZ82NKLQNRg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689991285; a=rsa-sha256; cv=none; b=QlV84ILBaweC15UHsQSrKS9J0RHM3wUdvXyH2+G4oB28w7DT8eyFvkLeibdk160Vo527rK VzCgkyNHiVzy9TxjHVqbLfLGliJ3IbE1kB+48TiXRuqh4f89flDtGAP6N4eIlt7EHyKMQc ATC4xoTY3QvzfFisBrs/Z5tlfMcdIB4sStX4TA2WwkQv5RDH/cdCDSuh23IVEjmgy1GJAe Lm6V5RjZieJduKHkNOUOphyt8VF3ta9fNJ4CY+pOVUqB3IyzrJxuIo+IF45qx1OM132nIG e8t8evLsfyNW/X2KAvfx6wn1oSZgMoj/vXQQ4GTYpRTF/o3fyPpquU5i4CWkBA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b="CG/c30Gt"; 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) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qN1vh-0005xq-Rj; Fri, 21 Jul 2023 22:01:09 -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 1qN1vd-0005xO-To for guix-patches@gnu.org; Fri, 21 Jul 2023 22:01:07 -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 1qN1va-0003Yj-DT for guix-patches@gnu.org; Fri, 21 Jul 2023 22:01:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qN1va-00059S-3I for guix-patches@gnu.org; Fri, 21 Jul 2023 22:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64746] [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Jul 2023 02:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64746 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64746@debbugs.gnu.org Cc: Josselin Poiret , Tobias Geerinckx-Rice , Simon Tournier , Mathieu Othacehe , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Christopher Baines , Ricardo Wurmus Received: via spool by 64746-submit@debbugs.gnu.org id=B64746.168999123119757 (code B ref 64746); Sat, 22 Jul 2023 02:01:02 +0000 Received: (at 64746) by debbugs.gnu.org; 22 Jul 2023 02:00:31 +0000 Received: from localhost ([127.0.0.1]:35111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qN1v4-00058b-NS for submit@debbugs.gnu.org; Fri, 21 Jul 2023 22:00:31 -0400 Received: from mail-yb1-xb35.google.com ([2607:f8b0:4864:20::b35]:49310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qN1v1-00058K-Br for 64746@debbugs.gnu.org; Fri, 21 Jul 2023 22:00:29 -0400 Received: by mail-yb1-xb35.google.com with SMTP id 3f1490d57ef6-cfd4ea89978so2446039276.2 for <64746@debbugs.gnu.org>; Fri, 21 Jul 2023 19:00:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689991222; x=1690596022; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=84bt8yTfmKNvfCBcpxsZ9mzm/vcHul3LDpYK5nHUiiM=; b=CG/c30GtPoZXBCzdXBDqDrKVe4RHfIIHZ79QqD2iiz7m5IfUyD/kflSXJhJ5afGXGr deMPwaBEYngtiKXADF0sPI2VYxUN7zhT4CuAo8UJ8d/zwBDRVny0rBbcvqNyYWX2ihbS u5MSFH4qfnmfJwBZbdh53ddnxJbOB+x0U1hPNfhWUww+MI136MgL15w3c5vFrAg1zaKP RaeofXCY74s5WnLwnQKsdXcETyj0Xn0rpouNPj1+bOs4JCRfNg1kLVlCebHlIM2JfaVJ uHY0nDuL6xaFBL1rc/FEaLgyPUAMMZJ7HHx3cTjIS5YwRBohUR+ksX9inpw8qjpPkreo RbNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689991222; x=1690596022; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=84bt8yTfmKNvfCBcpxsZ9mzm/vcHul3LDpYK5nHUiiM=; b=VUjM8YNsk5EDULoLWv0iWLiyZmM8lSEkEQlEohGZNVIQCtRbmY2vJ7e2nA3b8OkOuv DgcoHVs01EAJsTm6ZNLfRlCBVhYAn8K2zKWha+cMHSsJiqm2tN/GF6nR24q2Rp0ek58r /FLh8Gvmv6P0GyRlF28h4pvXA8q8qYj/3l29EpvIpQXB/pQGMYOODuSi9+IJhipO92aV Psv1Pap/CXOCa5dk3fX2dQ4yK2vqyKpIXH6BlXZTub4BkWYL23qQEdd0arUfFbgi+NT8 7FBh4czmjw2TuJX1eZXKNJBF1l4JR86c/h3U54mrVfqLCirQuwPRVVqPoHVOmkNAGHAy /2Dw== X-Gm-Message-State: ABy/qLbyz4OJ/ijd4sn9UikqapUWnAMAgzOXK0qhUHBaFRJWUubJNja9 Utjjc3sZVEJ2dXnwReXh0vE= X-Google-Smtp-Source: APBJJlEkALoMuZ2ySKItyasVCK/CQOX1MGd5AdvN6YG7dyY5pwAVmSfbveMqj3JoHHhuojhAv2s7yw== X-Received: by 2002:a25:738e:0:b0:cdd:6635:a1f8 with SMTP id o136-20020a25738e000000b00cdd6635a1f8mr3307953ybc.15.1689991221748; Fri, 21 Jul 2023 19:00:21 -0700 (PDT) Received: from hurd (dsl-10-135-166.b2b2c.ca. [72.10.135.166]) by smtp.gmail.com with ESMTPSA id ou37-20020a05620a622500b00767cc1463e9sm1531682qkn.75.2023.07.21.19.00.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jul 2023 19:00:20 -0700 (PDT) From: Maxim Cournoyer References: Date: Fri, 21 Jul 2023 22:00:18 -0400 In-Reply-To: (Maxim Cournoyer's message of "Thu, 20 Jul 2023 12:34:01 -0400") Message-ID: <87lef8hfil.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) 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: 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-Scanner: mx2.migadu.com X-Migadu-Spam-Score: 7.36 X-Spam-Score: 7.36 X-Migadu-Queue-Id: 43E10425F7 X-TUID: aUP9QgZxSsZv Hello, Maxim Cournoyer writes: > * doc/guix.texi (Invoking guix time-machine): Document limitation. > * guix/scripts/time-machine.scm (%oldest-possible-commit): New variable. > (guix-time-machine): Raise an error when the channel commit is too old. > > Suggested-by: Simon Tournier > --- > doc/guix.texi | 6 ++++++ > guix/scripts/time-machine.scm | 23 ++++++++++++++++++++++- > 2 files changed, 28 insertions(+), 1 deletion(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index 1d8ebcd72f..30fef813c0 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -5056,6 +5056,12 @@ Invoking guix time-machine > large number of packages; the result is cached though and subsequent > commands targeting the same commit are almost instantaneous. >=20=20 > +Due to @command{guix time-machine} relying on the ``inferiors'' > +mechanism (@pxref{Inferiors}), the oldest commit it can travel to is > +commit @samp{2ca299caf} (``Add (guix inferior) and (guix scripts > +repl).''), dated July 10@sup{th}, 2018. An error is returned when > +attempting to navigate to older commits. > + > @quotation Note > The history of Guix is immutable and @command{guix time-machine} > provides the exact same software as they are in a specific Guix > diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm > index d7c71ef705..36a40a1538 100644 > --- a/guix/scripts/time-machine.scm > +++ b/guix/scripts/time-machine.scm > @@ -2,6 +2,7 @@ > ;;; Copyright =C2=A9 2019 Konrad Hinsen > ;;; Copyright =C2=A9 2019, 2020, 2021 Ludovic Court=C3=A8s > ;;; Copyright =C2=A9 2021 Simon Tournier > +;;; Copyright =C2=A9 2023 Maxim Cournoyer > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -19,13 +20,15 @@ > ;;; along with GNU Guix. If not, see . >=20=20 > (define-module (guix scripts time-machine) > + #:use-module (guix channels) > + #:use-module (guix diagnostics) > #:use-module (guix ui) > #:use-module (guix scripts) > #:use-module (guix inferior) > #:use-module (guix store) > #:use-module (guix status) > #:use-module ((guix git) > - #:select (with-git-error-handling)) > + #:select (update-cached-checkout with-git-error-handling= )) > #:use-module ((guix utils) > #:select (%current-system)) > #:use-module ((guix scripts pull) > @@ -38,9 +41,16 @@ (define-module (guix scripts time-machine) > #:use-module (srfi srfi-1) > #:use-module (srfi srfi-11) > #:use-module (srfi srfi-26) > + #:use-module (srfi srfi-34) > #:use-module (srfi srfi-37) > + #:use-module (srfi srfi-71) > #:export (guix-time-machine)) >=20=20 > +;;; The commit introducing the 'inferiors' mechanism; it is the oldest c= ommit > +;;; that can be travelled to. > +(define %oldest-possible-commit > + "2ca299caf64489f4e1e665ec1158fb0309b0b565") I just tried travelling to that assumed oldest commit (because it corresponds to the introduction of the inferiors mechanism), but it fails like: --8<---------------cut here---------------start------------->8--- Computing Guix derivation for 'x86_64-linux'... Backtrace: - 5 (primitive-load "/gnu/store/b70mihsj9xx0xxp6izliqb5vm4=E2=80= =A6") In ice-9/eval.scm: 155:9 4 (_ _) 159:9 3 (_ #(#(#(#(#(#(#(#(#(#(#(=E2=80=A6) =E2=80=A6) =E2=80=A6) =E2= =80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) = =E2=80=A6)) 173:47 2 (_ #(#(#(#(#(#(#(#(#(#(#(=E2=80=A6) =E2=80=A6) =E2=80=A6) =E2= =80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) = =E2=80=A6)) In ./guix/self.scm: 932:4 1 (guix-derivation "/gnu/store/yfn2s94i5bvwr7j7r6xcnivwg=E2=80= =A6" =E2=80=A6) 903:2 0 (guile-for-build "3.0") ./guix/self.scm:903:2: In procedure guile-for-build: Throw to key `match-error' with args `("match" "no matching pattern" "3.0")= '. Backtrace: In ice-9/boot-9.scm: 1752:10 19 (with-exception-handler _ _ #:unwind? _ # _) In guix/store.scm: 659:37 18 (thunk) In guix/status.scm: 839:4 17 (call-with-status-report _ _) In guix/store.scm: 1298:8 16 (call-with-build-handler # =E2=80=A6) In guix/monads.scm: 576:2 15 (run-with-store # =E2=80= =A6) In guix/inferior.scm: 927:8 14 (_ _) In guix/channels.scm: 982:2 13 (_ _) 924:2 12 (_ _) In guix/store.scm: 1883:0 11 (_ _) 1996:8 10 (_ _) In guix/channels.scm: 675:14 9 (_ #) In guix/monads.scm: 576:2 8 (run-with-store # =E2=80= =A6) In guix/store.scm: 1298:8 7 (call-with-build-handler _ _) 1298:8 6 (call-with-build-handler # =E2=80=A6) In guix/channels.scm: 690:14 5 (_) In guix/monads.scm: 576:2 4 (run-with-store # =E2=80= =A6) In ice-9/eval.scm: 191:27 3 (_ #(#(# #) = =E2=80=A6)) In ice-9/boot-9.scm: 2007:7 2 (error _ . _) 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: invalid build result (# /gnu/store/b70mihsj9xx0xxp6izliqb5vm46= 2yifl-compute-guix-derivation 7ff1d8b55000> "") --8<---------------cut here---------------end--------------->8--- Is this a bug or expected? --=20 Thanks, Maxim