From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6X45OQOOyWBdPAEAgWs5BA (envelope-from ) for ; Wed, 16 Jun 2021 07:37:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id dD9kNAOOyWApTAAAB5/wlQ (envelope-from ) for ; Wed, 16 Jun 2021 05:37:07 +0000 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 9AF3917458 for ; Wed, 16 Jun 2021 07:37:07 +0200 (CEST) Received: from localhost ([::1]:44380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltOEc-0004ES-KF for larch@yhetil.org; Wed, 16 Jun 2021 01:37:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltOET-0004EK-Pq for guix-devel@gnu.org; Wed, 16 Jun 2021 01:36:57 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:56274) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ltOES-0005a6-4V; Wed, 16 Jun 2021 01:36:57 -0400 Received: by mail-wm1-x32e.google.com with SMTP id c84so478810wme.5; Tue, 15 Jun 2021 22:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=lusa/sfZ/fq0IAMZLm+HwzYKIjQDrurnQwg7/JPUw4M=; b=TGh6vony8KOrUncHY/wN9OBrpprUF27VZHJ/9m8KPW1LuSDdow/HKKssuDnBn8q+KK xEyqDiI92uT4Fr5xz/8zLl+btr3Oqu/gdqGAzHbuYlWAGQcjeD9Sg2RpLoR8N5foD4Z8 JzK0/Z2eqWT4KpEhQEIfnMgENB//nTzdxWvi3Fv+Xn+TncuvRvOIPWqZNntS/y9wj87e SRaPPf9vrIpnjU9x2JTRHGSXX+QLbXlToLwBAb12K+MlTgMd/QQ74jvtANMchkZ3xiS2 tQzPZFP6DgTyRNf/jYdj6pZ5x89/pPSgmQtszqLGGfc/wSknfJCobDs64jVQ03yEhFPN M7uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=lusa/sfZ/fq0IAMZLm+HwzYKIjQDrurnQwg7/JPUw4M=; b=sPQM0MrTrJv+5/7cp3gSg272BdzHzD9yekpZSU1+dFKMMDxTs/qdgAnkEiHSmt1bRL cJiZHD4YYKLwTY7fItfP7gITwQbi6fnAOa/6gdJHcPh8kDSeWH+pmFaENW+rjXRan/rU CBPMd1Liglrkbp/OFR02FCDOyCcT0gdwYfxmaN37f1JQhzq9FG6LYeMqXOdJTOeaNIz0 KVmVFuwpewrboviSLXCkrNqjl3PE0UN9wxsy9mLLQ4nzKuv9mTosJ7yIQEsxXXbU6XB+ 7wCM84sQf/eUCQ9BvlVSNh6bZk+HaMv/UELg6gqkwCaJRX1w940ndOgyWFg7qJ4Nzupu uG6w== X-Gm-Message-State: AOAM532GBwlMbozeViwgqcgL1FBLB6903Y2CEpfXJ8JXqFzcecSzCT5V SM19sq+4hU+kDXy8OmNY0ATE4RMZKAo= X-Google-Smtp-Source: ABdhPJxM161KQNdGFqt9q2TrKyHXBp7c4YWDI7gCILqhMtIsmBWPx3dLlAZY3fRHclOBV2+2ZaXEbA== X-Received: by 2002:a1c:9dd4:: with SMTP id g203mr634845wme.132.1623821814141; Tue, 15 Jun 2021 22:36:54 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id l10sm934183wrm.2.2021.06.15.22.36.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Jun 2021 22:36:53 -0700 (PDT) From: zimoun To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: "guix pull" expiry channels In-Reply-To: <87y2bg3x5q.fsf@gnu.org> References: <87y2bg3x5q.fsf@gnu.org> Date: Wed, 16 Jun 2021 07:33:23 +0200 Message-ID: <867diujrvg.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix Devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1623821827; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=lusa/sfZ/fq0IAMZLm+HwzYKIjQDrurnQwg7/JPUw4M=; b=Bwbfnd6qXqDIUCsi0U08QEZ2iPIrIQr+CsHrdykSowt/hAADrDVzQzpqt7Rw3B8jQV6/Oi lzNvTFtY7qKwXLR9FTx+eKnQp7m/zbXivRgtjvef7ARQZW1FSC3Kkyzc7NxufGhmSLYYja V12F6ib0Nbj7k6bZRzfH7A2iq1lER8fMyFVgR9aRCfSK1GILacLKnCrNezJRxuRcn/M5wA DCY+oetp4VMSAiJivTDLJMqlX6LJUc8IzV+BtH1K3tCFiy5ochol/X5QsjYHRfY4/OAX4G XETYR5MLrFp0JBC/WrW+22P+ksXeft1lga6kKltEO6sCd+rstIQssqgVM9MB+Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1623821827; a=rsa-sha256; cv=none; b=YvHgkUqPoB+babPeT4a8E09kOqmkQLMKaEVLF32hcwFUeJcZ2wtq1o5Lau3ADx0CYASdIS 5XpD1ZSRexj9MrsUiQMXu+lBJleCdcK3MHK01mhwF2VCyyv++xQ0JBokrZMJQKqV5gRhOa bXR/tmwgTpX+PanFAMvSyGdwgVLHnXeMf5DzFB9ncgNmRuWM6fe0mf8ygcg3pG7UuotQX4 HXiTY+3fQ7nFuxDc296QiJkj7MeF7wyboHwaCuRO13M1kN+09H5GqhRCElzlKG+7IjDFtK HM9ygutqYDZz6/3erM0tKwPUc6n4IFtbRb83BkT8YNkt1GQ2hmcuzEOTr3++AA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=TGh6vony; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=TGh6vony; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 9AF3917458 X-Spam-Score: -3.12 X-Migadu-Scanner: scn1.migadu.com X-TUID: jJpdSRYYvPWd Hi, On Fri, 11 Jun 2021 at 23:32, Ludovic Court=C3=A8s wrote: > The code in (guix git) determines expiration based on the mtime of > sub-directories in ~/.cache/guix/checkouts. But that=E2=80=99s bogus, no? > > Yes, and the Internet confirms: a directory=E2=80=99s mtime is only chang= ed when > a file inside it is renamed, added, or deleted.) Oops! So it would > depend on how frequently you pull, and perhaps on the file system you > use, go figure. Hehe! :-) > diff --git a/guix/git.scm b/guix/git.scm > index 57fa2ca1ee..9c6f326c36 100644 > --- a/guix/git.scm > +++ b/guix/git.scm > @@ -424,6 +424,14 @@ it unchanged." > ;; REPOSITORY as soon as possible. > (repository-close! repository) >=20=20 > + ;; Update CACHE-DIRECTORY's mtime to so the cache logic sees it. > + (match (gettimeofday) > + ((seconds . microseconds) > + (let ((nanoseconds (* 1000 microseconds))) > + (utime cache-directory > + seconds seconds > + nanoseconds nanoseconds)))) > + > ;; When CACHE-DIRECTORY is a sub-directory of the default cache > ;; directory, remove expired checkouts that are next to it. > (let ((parent (dirname cache-directory))) LGTM. Thanks for the quick fix. :-) Cheers, simon