unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: guix-devel@gnu.org
Subject: Re: core-updates: fonts-dir-builder fails
Date: Tue, 08 Aug 2017 16:07:39 +0200	[thread overview]
Message-ID: <87mv7anoes.fsf@elephly.net> (raw)
In-Reply-To: <87poc6nvmr.fsf@elephly.net>

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]


Ricardo Wurmus <rekado@elephly.net> writes:

> Hi Guix,
>
> I’m trying to install python-wrapper on core-updates:
>
> --8<---------------cut here---------------start------------->8---
[…]
> ERROR: In procedure open-file:
> ERROR: In procedure open-file: No such file or directory: "fonts.scale"
> builder for `/gnu/store/8j5bll1y0c3zrifrp984gd3gfarf0ra4-fonts-dir.drv' failed with exit code 1
> cannot build derivation `/gnu/store/md131pdqsvxmxna3ndwd5334x6876m54-profile.drv': 1 dependencies couldn't be built
> guix package: error: build failed: build of `/gnu/store/md131pdqsvxmxna3ndwd5334x6876m54-profile.drv' failed
> --8<---------------cut here---------------end--------------->8---
>
> Could this be because (@@ (guix profiles) fonts-dir-file) first deletes
> the file and then checks if the file is empty?

That’s exactly what happens.  I’ve fixed this locally with this patch:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-profiles-Only-check-file-contents-if-the-file-exists.patch --]
[-- Type: text/x-patch, Size: 1435 bytes --]

From 47b399ef085514b9269c881723cfd3ec8f1dc564 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Tue, 8 Aug 2017 16:05:58 +0200
Subject: [PATCH] profiles: Only check file contents if the file exists.

* guix/profiles.scm (fonts-dir-file): Check that files exist before using
"empty-file?".
---
 guix/profiles.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index b3732f61e..0eb99f40d 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1095,9 +1095,11 @@ files for the fonts of the @var{manifest} entries."
                                 (unless (and (zero? (system* mkfontscale))
                                              (zero? (system* mkfontdir)))
                                   (exit #f))
-                                (when (empty-file? fonts-scale-file)
+                                (when (and (file-exists? fonts-scale-file)
+                                           (empty-file? fonts-scale-file))
                                   (delete-file fonts-scale-file))
-                                (when (empty-file? fonts-dir-file)
+                                (when (and (file-exists? fonts-dir-file)
+                                           (empty-file? fonts-dir-file))
                                   (delete-file fonts-dir-file))))
                             directories)))))))
 
-- 
2.13.3


[-- Attachment #3: Type: text/plain, Size: 131 bytes --]


What do you think?  Should I push this?

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

  reply	other threads:[~2017-08-08 14:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-08 11:31 core-updates: fonts-dir-builder fails Ricardo Wurmus
2017-08-08 14:07 ` Ricardo Wurmus [this message]
2017-08-08 14:23 ` Danny Milosavljevic

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87mv7anoes.fsf@elephly.net \
    --to=rekado@elephly.net \
    --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 public inbox

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

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).