all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: guix-devel@gnu.org
Subject: Re: how to get the path of the logfile after an unsuccesful build?
Date: Sun, 11 Mar 2018 20:55:56 -0400	[thread overview]
Message-ID: <87a7vejen7.fsf@netris.org> (raw)
In-Reply-To: <87po4c7wcl.fsf@netris.org> (Mark H. Weaver's message of "Fri, 09 Mar 2018 16:49:46 -0500")

Mark H Weaver <mhw@netris.org> writes:

> ng0 <ng0@n0.is> writes:
>
>> did we ever talk about that there's too little information on how to get
>> the current log file of a failed build? I need this right now (the full log)
>> and I can't remember how, and making use of the log folder in var/log/guix/ won't
>> help either.
>
> Why won't /var/log/guix help?  To see the most recent build logs for a
> given package, say 'icecat', I do this:
>
>   ls -ltr /var/log/guix/drvs/*/*-icecat* | tail

I should also mention a few other ways to find a specific log file:

Most importantly, the file names in /var/log/guix/drvs can be easily
derived from the corresponding derivation (.drv) file name.  The first
two characters of hash become the directory name, and the rest becomes
the file name, with ".bz2" added (unless you disabled log compression in
the daemon).  Here's an example .drv file and its corresponding log
file:

_________/gnu/store/8110245r80b1rqpjlf3x33k96h1f8gms-linux-libre-4.15.8.drv
/var/log/guix/drvs/81/10245r80b1rqpjlf3x33k96h1f8gms-linux-libre-4.15.8.drv.bz2

Note that the .drv file names are printed after "The following
derivations will be built".  If you lost the log where that message was
printed, you could run "guix build --dry-run" again, assuming that you
haven't updated Guix since the relevant build attempt.

In typical cases, you might be able to use "guix build --log-file" to
get the log file name, possibly also with "--no-grafts".  You can pass
it either a raw store item /gnu/store/...  or a package specification.

While I'm at it, here are some other tricks for finding logs of
_successful_ builds:

If you find that the log file contains only a single line of the form:

  grafting '/gnu/store/…-foo' -> _

Then it corresponds to a grafted derivation, and you need to find the
original ungrafted derivation.  In most cases this can be done by
running "guix build --log-file /gnu/store/…-foo", passing the first file
name from the "grafting" message.

Alternatively, you could look in the .drv file of the grafting
derivation, which will include the file name of the original ungrafted
derivation among its input derivations.

      Mark

  reply	other threads:[~2018-03-12  0:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09  9:15 how to get the path of the logfile after an unsuccesful build? ng0
2018-03-09 13:52 ` Ricardo Wurmus
2018-03-09 14:06   ` ng0
2018-03-09 14:28     ` Clément Lassieur
2018-03-09 14:39       ` ng0
2018-03-09 14:44     ` Hartmut Goebel
2018-03-09 14:49       ` ng0
2018-03-09 15:28       ` Clément Lassieur
2018-03-10 15:31       ` Ludovic Courtès
2018-03-10 22:29         ` Ricardo Wurmus
2018-03-09 21:49 ` Mark H Weaver
2018-03-12  0:55   ` Mark H Weaver [this message]
2018-03-23  4:54     ` Chris Marusich
2018-03-11  6:28 ` Catonano
2018-03-11  6:46   ` Catonano
2018-03-11 11:12     ` Ricardo Wurmus
2018-03-11  8:11   ` ng0

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a7vejen7.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.