mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
store: Fix 'log-file' to support uncompressed logs.
* guix/store.scm (log-file): Report the file without '.bz2' if it exists.
This commit is contained in:
parent
87236aed77
commit
021a201f29
1 changed files with 10 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -753,12 +753,15 @@ (define state-dir ; XXX: factorize
|
|||
(or (getenv "NIX_STATE_DIR") %state-directory))
|
||||
|
||||
(cond ((derivation-path? file)
|
||||
(let* ((base (basename file))
|
||||
(log (string-append (dirname state-dir) ; XXX: ditto
|
||||
"/log/nix/drvs/"
|
||||
(string-take base 2) "/"
|
||||
(string-drop base 2) ".bz2")))
|
||||
(and (file-exists? log) log)))
|
||||
(let* ((base (basename file))
|
||||
(log (string-append (dirname state-dir) ; XXX: ditto
|
||||
"/log/nix/drvs/"
|
||||
(string-take base 2) "/"
|
||||
(string-drop base 2)))
|
||||
(log.bz2 (string-append log ".bz2")))
|
||||
(cond ((file-exists? log.bz2) log.bz2)
|
||||
((file-exists? log) log)
|
||||
(else #f))))
|
||||
(else
|
||||
(match (valid-derivers store file)
|
||||
((derivers ...)
|
||||
|
|
Loading…
Reference in a new issue