From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id co+YJ51vgl81WgAA0tVLHw (envelope-from ) for ; Sun, 11 Oct 2020 02:36:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id X8TCIp1vgl9xCwAAbx9fmQ (envelope-from ) for ; Sun, 11 Oct 2020 02:36:13 +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 93F8F940631 for ; Sun, 11 Oct 2020 02:36:10 +0000 (UTC) Received: from localhost ([::1]:34446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRRDU-0004Vl-Bh for larch@yhetil.org; Sat, 10 Oct 2020 22:36:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRRDN-0004VY-US for bug-guix@gnu.org; Sat, 10 Oct 2020 22:36:01 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55617) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kRRDN-0000Ew-Kv for bug-guix@gnu.org; Sat, 10 Oct 2020 22:36:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kRRDN-0004Yd-JL for bug-guix@gnu.org; Sat, 10 Oct 2020 22:36:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#43893: [PATCH] maint: update-guix-package: Ensure sources are clean. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 11 Oct 2020 02:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43893 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Danny Milosavljevic , ludo@gnu.org Received: via spool by 43893-submit@debbugs.gnu.org id=B43893.160238373217479 (code B ref 43893); Sun, 11 Oct 2020 02:36:01 +0000 Received: (at 43893) by debbugs.gnu.org; 11 Oct 2020 02:35:32 +0000 Received: from localhost ([127.0.0.1]:38929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRRCt-0004Xr-KV for submit@debbugs.gnu.org; Sat, 10 Oct 2020 22:35:31 -0400 Received: from mail-qv1-f66.google.com ([209.85.219.66]:38267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRRCs-0004XZ-4P for 43893@debbugs.gnu.org; Sat, 10 Oct 2020 22:35:30 -0400 Received: by mail-qv1-f66.google.com with SMTP id de3so6777442qvb.5 for <43893@debbugs.gnu.org>; Sat, 10 Oct 2020 19:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=jDxiFkyuV2PkdKRAgt22Iv/N4WQTcEEAXoLAa/f++fc=; b=EAP2G79v0HN2jEi2+wfAhDa7X+rWqAYKVT0mRFh94Z70ub6Qa5Zt0s8OLGS5MYHiGQ ZhjladXf5e3HiWeg4r2j+KUaaxCXJKGw7AdhOiro0kPy2wz9zdmFvmrrE5bT6lketcUf eqTdb4dPl7FaLHmxUtAxmeN0n5DJBHVEcT1FV1auXcUFzzjLsDJPpw2BP5ldHZszchnd jZyhxsONB4I2RbjvUipFB/SiVRZSO48HV9LUa1TYM5qBGPDIEJVyHb1qa0xqAbNxHFd2 0CNGeENE6zEKK/Fs8Or/VuELxnJuTQdC7aaUju7p/8wg05JLdA8zlHGP3V087EZzGtRt 4Gbg== 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:references:date:in-reply-to :message-id:user-agent:mime-version; bh=jDxiFkyuV2PkdKRAgt22Iv/N4WQTcEEAXoLAa/f++fc=; b=DCGVPgmvc//h5Ug0r6qOEH6Q27QtoYUy967t6BWrpFKMGj9fRFVZqKBrLxFwt2fxKz Qf0vhqYZZzNGlcmF4wqYVZMlhjwW2UMVU/f9pnTVzUls9Vv1gR8K3qPnp1VoS0MX8p/B Pr7eY7NiN0LK1oVEjQDUzbEknonOFaDnceDFLg8L3d78N81FiyxnmmXTScuounlHAl0q ER+IbdwVEKSjAohxIMXNuenaRryfg/LSjaC+P5YrLoqv89zZQwoih2FGPDH9a9jDcW1e viOn3mykige84WFHqiwSx2IpGtr/E39ac+13g75FKPyMKcNLCUFMYibAuJe2AjTI0eN0 O81w== X-Gm-Message-State: AOAM532XAZuXUlsJkG/kggXtZuQFNOa01e9HxkRqEZXTE22rte9aI5HN duhTFBndzXFW+aJ2Ayv7O/3CuS+QB24= X-Google-Smtp-Source: ABdhPJxu/xzjHg6Gb4+1CB2P80gPn/XR6f/ClgqjHOClxHZLiU7jXsf/fznpo/TK4iFRpkSWTQeFAw== X-Received: by 2002:ad4:4c4a:: with SMTP id cs10mr20354264qvb.48.1602383724448; Sat, 10 Oct 2020 19:35:24 -0700 (PDT) Received: from hurd (dsl-10-148-10.b2b2c.ca. [72.10.148.10]) by smtp.gmail.com with ESMTPSA id p5sm8113685qtu.13.2020.10.10.19.35.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Oct 2020 19:35:23 -0700 (PDT) From: Maxim Cournoyer References: <87eem7qcxc.fsf@gmail.com> <20201010050852.19975-1-maxim.cournoyer@gmail.com> <20201010135913.6d0e02d5@scratchpost.org> Date: Sat, 10 Oct 2020 22:35:22 -0400 In-Reply-To: <20201010135913.6d0e02d5@scratchpost.org> (Danny Milosavljevic's message of "Sat, 10 Oct 2020 13:59:13 +0200") Message-ID: <87eem5trpx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 43893@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=EAP2G79v; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 1.59 X-TUID: vzUeCZ1SSKpF Hi Danny, Danny Milosavljevic writes: > Hi Maxim, > > hmm, git worktree can fail if the commit already is checked out somewhere (for > example if you invoke make update-guix-package twice in a row), or if the user > used git worktree on that repo for that commit for other purposes. That would > mean that > > make update-guix-package The "--detached" option is the one allowing to have multiple checkouts of the same commit. > would fail in weird undocumented ways again. Please please let's document > stuff at least. > > Also, why not just fail when there's uncommitted stuff? Well, if the tool says clearly it's going to update the guix package to commit X, which is the latest commit in your tree, and doesn't have technical reasons preventing it from doing so successfully, why enforce a clean tree? Using a worktree to setup a pristine checkout also covers for uses such as 'git update-index --skip-worktree some-file-or-path' or 'git update-index --assume-unchanged some-file-or-path', which would go undetected by checking for modifications with 'git diff-index --quiet HEAD'. We'd also have to check for the output of > This patch looks like it goes to quite some length to enable you to build a > guix package of committed stuff only (which is NOT what your working copy is > actually like). Is there a use case for that? Sounds weird to me. That's exactly what the tool should do, as there's no point upgrading the guix package definition to a state that doesn't exist as a commit. > Even if there's a use case for that, please add a warning if there are > uncommitted changes that are now not included in the "guix" package. They were never included in the upgraded guix package (the one you'd 'git push' anyway), they were just put in your store for computing the hash, which is problematic as we saw. > Other than that, okay. > >>#FIXME: This doesn't work (recursion?) >>./pre-inst-env guix build guix --with-git-url=guix=file://$PWD > > Why doesn't it work? That sounds like a big limitation--that basically means > you can't test with local-only commits, you'd always have to push. We > should find out why this doesn't work and fix it. I've tested it again, and it worked... I think what got is surprising is that the only output I had for multiple minutes was: --8<---------------cut here---------------start------------->8--- updating checkout of 'file:///home/maxim/src/guix'... --8<---------------cut here---------------end--------------->8--- And the CPU peaked and the RAM stayed around 1 GiB while it was doing its magic. Maxim