From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: core-updates: fonts-dir-builder fails Date: Tue, 8 Aug 2017 16:23:18 +0200 Message-ID: <20170808162318.1a226eea@scratchpost.org> References: <87poc6nvmr.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1df5Pv-0003Gx-H4 for guix-devel@gnu.org; Tue, 08 Aug 2017 10:23:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1df5Pq-0002ZD-ID for guix-devel@gnu.org; Tue, 08 Aug 2017 10:23:31 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:53096) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1df5Pq-0002XE-Bk for guix-devel@gnu.org; Tue, 08 Aug 2017 10:23:26 -0400 In-Reply-To: <87poc6nvmr.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel@gnu.org Hi Ricardo, > 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? It removes the fonts.scale, then invokes mkfontscale (which is supposed to create fonts.scale) and then it checks whether the fonts.scale is empty (in which case i would be unnecessary to store it). Apparently it can happen that mkfontscale doesn't create a fonts.scale at all - maybe when there are no fonts in that directory? If so, then it might make sense to amend the check at the end to (when (and (file-exists? fonts-scale-file) (empty-file? fonts-scale-file)) (delete-file fonts-scale-file)) (when (and (file-exists? fonts-dir-file) (empty-file? fonts-dir-file)) (delete-file fonts-dir-file)))) In the interest of defensive programming I think one ought to do that anyway.