From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH -v2 2/2] guix: profiles: create fonts.dir/scale for all fonts directories Date: Wed, 08 Mar 2017 18:18:29 +0100 Message-ID: <87fuinlmai.fsf@gnu.org> References: <20170307110749.31614-1-huang.ying.caritas@gmail.com> <20170307110749.31614-2-huang.ying.caritas@gmail.com> <20170307212452.2ddda246@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clfET-0007Cw-BK for guix-devel@gnu.org; Wed, 08 Mar 2017 12:18:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clfEP-0004OD-AT for guix-devel@gnu.org; Wed, 08 Mar 2017 12:18:37 -0500 In-Reply-To: (huang ying's message of "Wed, 8 Mar 2017 15:44:47 +0800") 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: huang ying Cc: guix-devel@gnu.org huang ying skribis: > On Wed, Mar 8, 2017 at 4:24 AM, Danny Milosavljevic > wrote: >> Hi, >> >>> + (with-directory-excursion dir >>> + (and (file-exists? fonts-scale-file) >>> + (delete-file fonts-scale-file)) >>> + (and (file-exists? fonts-dir-file) >>> + (delete-file fonts-dir-file)) >>> + (system* mkfontscale) >>> + (system* mkfontdir) >> >> Please do not throw away the status code here (result of system*). You c= an check for okayness by (zero? (system* ...)). > > Then what is the intended behavior? abort the build process with > message and non-zero exit code? Usually we will raise a exception or > just display some message and exit? See for instance =E2=80=98info-dir-file=E2=80=99, which does this: (exit (every install-info (append-map info-files '#$(manifest-inputs manifest)))) The effect is to exit with 0 upon success and some other code upon failure, leading to a proper derivation build failure. HTH! Ludo=E2=80=99.