From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGAZD-000069-Fk for guix-patches@gnu.org; Wed, 31 May 2017 16:50:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGAZ8-00088f-RF for guix-patches@gnu.org; Wed, 31 May 2017 16:50:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:45277) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dGAZ8-00088Z-Nc for guix-patches@gnu.org; Wed, 31 May 2017 16:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dGAZ8-00008C-Ec for guix-patches@gnu.org; Wed, 31 May 2017 16:50:02 -0400 Subject: bug#27162: [PATCH 0/6] Display how much will be downloaded Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170531134941.8012-1-ludo@gnu.org> Date: Wed, 31 May 2017 22:48:53 +0200 In-Reply-To: (Maxim Cournoyer's message of "Wed, 31 May 2017 12:42:29 -0700") Message-ID: <87mv9s92h6.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Maxim Cournoyer Cc: 27162@debbugs.gnu.org Hi, Maxim Cournoyer skribis: > On Wed, May 31, 2017 at 6:49 AM, Ludovic Court=C3=A8s wrot= e: >> Hello! >> >> With this patch series, =E2=80=98show-what-to-build=E2=80=99 can display= the download >> size and warn about lack of disk space when needed: >> >> $ ./pre-inst-env guix build synfigstudio -n >> substitute: updating list of substitutes from 'https://bayfront.guixsd= .org'... 100.0% >> 10.8 MB would be downloaded: >> /gnu/store/jq80lq3xhib81fi2v6j7ygh7mqdjrjsx-synfigstudio-1.2.0 >> /gnu/store/azvp0257q9yhl0b409q1s6h67pfhaknr-libxml++-3.0.1 >> /gnu/store/bjmwcqxr32g48jzwc0zc993m8x3ymq5h-synfig-1.2.0 >> /gnu/store/lxmviq543w2a4ahc4c77i542sl921bbl-mlt-6.4.1 >> guix build: warning: at least 73.8 MB needed but only 42.0 MB availabl= e in /gnu/store >> >> Thoughts? > > This is really neat! Thanks for that. Shouldn't the default behavior > of build to stop right there (even without the -n flag) and errors out > when it "knows" there won't be enough space to successfully build the > derivations? This would prevent bad surprises and is still > non-interactive. Good point! On my previous laptop I was always short on disk space, so what I would do is spawn =E2=80=98guix package=E2=80=99 or similar, and then once it had= started, I would start =E2=80=98guix gc=E2=80=99 in a separate terminal; that way I kn= ew it=E2=80=99d only GC things that don=E2=80=99t matter for the operation at hand. Granted, that=E2=80=99s a bit far-fetched, but perhaps there are other situations where you=E2=80=99d want to proceed anyway because you know you= =E2=80=99ll be freeing space somehow. Now, maybe the default could still be to error out, and we=E2=80=99d have a force flag as you wrote (--no-error-if-full?) for these other cases. That would add a little bit of complexity though. Ludo=E2=80=99.