GNU bug report logs

#28510 crash: guix build -S foo --with-source=bla

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Full log

Message #31 received at 28510@debbugs.gnu.org (full text, mbox, reply):

Received: (at 28510) by debbugs.gnu.org; 8 Oct 2022 15:16:48 +0000
From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 08 11:16:48 2022
Received: from localhost ([127.0.0.1]:41182 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ohBZH-00040f-P6
	for submit@debbugs.gnu.org; Sat, 08 Oct 2022 11:16:48 -0400
Received: from mail-wr1-f54.google.com ([209.85.221.54]:34367)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@gmail.com>) id 1ohBZC-00040I-IQ
 for 28510@debbugs.gnu.org; Sat, 08 Oct 2022 11:16:46 -0400
Received: by mail-wr1-f54.google.com with SMTP id b4so11166916wrs.1
 for <28510@debbugs.gnu.org>; Sat, 08 Oct 2022 08:16:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=0kaViFz3Fw4ms7uOqOrNNNReBdrAy4J0PMzqmpqfDY8=;
 b=KPtc4xXtcUp9o5VFbqwru4vxY123aSgZenmXxSQ1CBO2u+YFhTg4MHu1jDrzx54Bgj
 putDjg1VrcEwETOTybVwfCBNtBOYDu0BfM7hu08vst89uTVgBOd9ZthbAqZjE4os6JeI
 qSaSFMLNCVqx2UW9eGso4yqjlcfLLiZ7AY5YUMZ2wKf9G8FhUyrKr1aSZMo0GmJT93yx
 B+iyB40S2nvZevGX2pQojLM0Vla9jFCE4lSv+GY2SMKdXXMlXRv4RzdIpLu3udHYj0fK
 ubsS0dWxV4Q9tCQp58wkItTdEHweEHMRuIY17JFfFkvxBSvM1SjqFjNhPKaX3wT6BXNm
 R5Nw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=0kaViFz3Fw4ms7uOqOrNNNReBdrAy4J0PMzqmpqfDY8=;
 b=2Oz6b7hRLttHpbWYeOASxepYunsXSiObSt4mrowDd3GxdDFjx3At8MX9uwrxHLuQA7
 MYQwj1QfLu7tFcBZ3OAUeSXJaMpFcakTxd0U/KOKoJc1JAMKh0hHNrLIHQ/OUmFFH1pZ
 nh8FSoW2yHfJ9lrwWp5ug29Y/+5JLJcNj0Fbjo15rhtlTc/H69rdqnWGKnhwvKRc5MGJ
 1wxYmF4DaJKu+H/3t91tuxdTp/sDXMPxSqRyxLUblWbrvOF7WUz7kMUAkv0BRegiEgkE
 Ribd1tbfuGw86/gN7vtgUzAr+oS3ECC3l68nhKZa8Sn6e01SMp9ij6ZwjAKXHKgPYHo7
 O+qA==
X-Gm-Message-State: ACrzQf2twfeXibNkXT+tQ5XCh+t+RG1vNNJDupb1ztlnfNGifh/LCZJH
 ggZqu2fF+zOuOgLipa6/CR8=
X-Google-Smtp-Source: AMsMyM5U9dnNMb9Ohwbw8XxaMf8xUIMu3v3j4R5po8mf/GS0r4y/nVBRHYr4vsVkhb93qNisxrem3g==
X-Received: by 2002:a05:6000:1886:b0:22e:3921:fdc2 with SMTP id
 a6-20020a056000188600b0022e3921fdc2mr6408429wri.565.1665242196517; 
 Sat, 08 Oct 2022 08:16:36 -0700 (PDT)
Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e])
 by smtp.gmail.com with ESMTPSA id
 h4-20020a05600c350400b003c1a7ea3736sm6438715wmq.11.2022.10.08.08.16.35
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 08 Oct 2022 08:16:35 -0700 (PDT)
From: zimoun <zimon.toutoune@gmail.com>
To: jeremy@korwin-zmijowski.fr, Josselin Poiret <dev@jpoiret.xyz>
Subject: Re: bug#28510: crash: guix build -S foo --with-source=bla
In-Reply-To: <565ee080af7ef230e1c769bcfed440c2@korwin-zmijowski.fr>
References: <idjwp4uvqim.fsf@bimsb-sys02.mdc-berlin.net>
 <d566d759-38d7-849e-d067-35e207359210@korwin-zmijowski.fr>
 <229c1399-ce4b-b942-1bae-deea501f1c48@telenet.be>
 <87k05y2yjc.fsf@jpoiret.xyz> <86a66u0xhr.fsf@gmail.com>
 <87h7113k9a.fsf@jpoiret.xyz>
 <565ee080af7ef230e1c769bcfed440c2@korwin-zmijowski.fr>
Date: Sat, 08 Oct 2022 15:52:46 +0200
Message-ID: <86mta6tob5.fsf@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 28510
Cc: 28510@debbugs.gnu.org, Maxime Devos <maximedevos@telenet.be>
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
Hi Jérémy,

On Fri, 07 Oct 2022 at 10:41, jeremy@korwin-zmijowski.fr wrote:

> I feel not able to take decision about the proper way right now.
> So as a step forward I wrote a test to capture the behavior expected.
> Please have a look at it as it's the starting point for me.
> Next, I can implement the error handler, making the previous test to 
> pass.
> As the test checks the behaviour, it will let enough space to change 
> implementation later without invalitating the test.

Nice to start by the test! :-)

> (define-module (tests scripts build)
>   #:use-module (srfi srfi-64)
>   #:use-module (ice-9 exceptions)
>   #:use-module (guix scripts build)
>   #:use-module (srfi srfi-34))
>
> (test-begin "scripts")
>
> (define DUMMY_DEFINITION_PATH "/tmp/a.scm")
>
> (define (create-dummy-definition)
>   (call-with-output-file DUMMY_DEFINITION_PATH
>     (lambda (port)
>       (format port
>               "(use-modules (gnu packages) (guix packages) (guix gexp)) (package (inherit (specification->package \"hello\")) (source (local-file \"a.scm\")))"))))
>
> (define (delete-dummy-definition)
>   (delete-file DUMMY_DEFINITION_PATH))
>
> (test-group-with-cleanup "build"
>
>   (create-dummy-definition)
>
>   (test-equal "package definition as only source"
>     "/gnu/store/7mnkrg9bmybgyf1dn5n67di6ng6qvhkz-a.scm"
>     (guard
>         (ex
>          ((exception? ex) #f))
>       (guix-build "-f" DUMMY_DEFINITION_PATH "--source")))

Well, this test looks good to me.  However, I would lower what the
procedure under test.  For instance, package-source-derivation in
guix/packages.scm or show-derivation-outputs, as Josselin pointed [1].

1: <https://yhetil.org/guix/87k05y2yjc.fsf@jpoiret.xyz>

>
>   (delete-dummy-definition))
>
> (test-end "scripts")


Cheers,
simon




Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Sun Dec 22 15:56:09 2024; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.