unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* How to prevent incomplete build results from being garbage collected?
@ 2022-04-10  7:34 Mykola Nikishov
  2022-04-16  8:02 ` James Thomas
  0 siblings, 1 reply; 3+ messages in thread
From: Mykola Nikishov @ 2022-04-10  7:34 UTC (permalink / raw)
  To: help-guix

Hi there,

I'm trying to build a package that fails. In the meantime, I'd like to
reclaim some disk space by collecting garbage. After that, all build
results for such package are gone and rebuilding it next time just
wastes bandwidth and CPU cycles by re-downloading and re-building the
same stuff:

#+begin_example
  guix build <PACKAGE>
  guix gc
  guix build <PACKAGE>
#+end_example

Using --root=FILE with guix build does not help, I suppose it would help
only for successful build.

How could I retain build results regardless if build was successful or
not?

-- 
Mykola

Libre/Free Java Software Developer
https://manandbytes.gitlab.io/



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to prevent incomplete build results from being garbage collected?
  2022-04-10  7:34 How to prevent incomplete build results from being garbage collected? Mykola Nikishov
@ 2022-04-16  8:02 ` James Thomas
  2022-04-28  9:05   ` zimoun
  0 siblings, 1 reply; 3+ messages in thread
From: James Thomas @ 2022-04-16  8:02 UTC (permalink / raw)
  To: Mykola Nikishov; +Cc: help-guix

Mykola Nikishov wrote:

> Hi there,
>
> I'm trying to build a package that fails. In the meantime, I'd like to
> reclaim some disk space by collecting garbage. After that, all build
> results for such package are gone and rebuilding it next time just
> wastes bandwidth and CPU cycles by re-downloading and re-building the
> same stuff:
>
> #+begin_example
>   guix build <PACKAGE>
>   guix gc
>   guix build <PACKAGE>
> #+end_example
>
> Using --root=FILE with guix build does not help, I suppose it would help
> only for successful build.
>
> How could I retain build results regardless if build was successful or
> not?

I guess you meant 'dependencies' where you said 'results'. So maybe run:

guix shell -D <package> -r <path>

...once to keep a profile with the dependencies registered as a root.

--


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to prevent incomplete build results from being garbage collected?
  2022-04-16  8:02 ` James Thomas
@ 2022-04-28  9:05   ` zimoun
  0 siblings, 0 replies; 3+ messages in thread
From: zimoun @ 2022-04-28  9:05 UTC (permalink / raw)
  To: James Thomas, Mykola Nikishov; +Cc: help-guix

Hi,

On Sat, 16 Apr 2022 at 13:32, James Thomas <jimjoe@gmx.net> wrote:
> Mykola Nikishov wrote:

>> #+begin_example
>>   guix build <PACKAGE>
>>   guix gc
>>   guix build <PACKAGE>
>> #+end_example

[...]

> guix shell -D <package> -r <path>

In addition, you could use “guix gc -F 10G” or whatever space you would
like to reclaim.  Because “guix gc” delete all dead items whereas the
option ’-F’ (or ’-C’) tries to determine which items based on dates (I
guess).


Sometimes, I also do:

    for item in $(guix gc --list-dead | grep <filter>)
    do
       guix gc -D $item
    done

and you can pipe instead of for-looping. :-)


Hope that helps,
simon


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-28  9:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-10  7:34 How to prevent incomplete build results from being garbage collected? Mykola Nikishov
2022-04-16  8:02 ` James Thomas
2022-04-28  9:05   ` zimoun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).