From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id mPYnF4uTKWML0AAAbAwnHQ (envelope-from ) for ; Tue, 20 Sep 2022 12:18:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2NM4FouTKWOmkQAAG6o9tA (envelope-from ) for ; Tue, 20 Sep 2022 12:18:51 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 10C6B2D430 for ; Tue, 20 Sep 2022 12:18:50 +0200 (CEST) Received: from localhost ([::1]:36206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaaL3-0008V1-Ot for larch@yhetil.org; Tue, 20 Sep 2022 06:18:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaZQC-0000zH-VK for bug-guix@gnu.org; Tue, 20 Sep 2022 05:20:20 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57005) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oaZQA-0000HH-Kd for bug-guix@gnu.org; Tue, 20 Sep 2022 05:20:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oaZQA-0002to-FU for bug-guix@gnu.org; Tue, 20 Sep 2022 05:20:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#28510: crash: guix build -S foo --with-source=bla Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 20 Sep 2022 09:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28510 X-GNU-PR-Package: guix X-GNU-PR-Keywords: easy To: Maxime Devos , =?UTF-8?Q?J=C3=A9r=C3=A9my?= Korwin-Zmijowski , 28510@debbugs.gnu.org Received: via spool by 28510-submit@debbugs.gnu.org id=B28510.166366558111111 (code B ref 28510); Tue, 20 Sep 2022 09:20:02 +0000 Received: (at 28510) by debbugs.gnu.org; 20 Sep 2022 09:19:41 +0000 Received: from localhost ([127.0.0.1]:56083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaZPp-0002t9-8L for submit@debbugs.gnu.org; Tue, 20 Sep 2022 05:19:41 -0400 Received: from jpoiret.xyz ([206.189.101.64]:60036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaZPn-0002t0-D8 for 28510@debbugs.gnu.org; Tue, 20 Sep 2022 05:19:40 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 2878C184BCF; Tue, 20 Sep 2022 09:19:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1663665576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=was+lOdiCsW1NYT+V/FbuOX04brnrDwN29sZ00d6kqM=; b=gAMyn4F2kVI9J/u+Ykzm0dRO8RefsACRRcumJQwaTab29bZTLGapw6tzTC73N7wpDxGbII aKaDVuOrkzQJEBY5Is9JkE0XbV+kDReUsqXW/xVgeTpAwE/m2TbmK/y5l22yUj7n5Itv12 4ysN0EO0SY192OBl2XGy1///ocd7ynyySHkX4TBnjMXMVhScpLVk0wwCx6IabaARrgAOhw 5KGn+Ymn1bHeIERVHuY6Q+f/T+UqOFXXiRym0Svfu8roIMyNVJEwKA0+iEjDD6DC4runSM +6FqsDFJDJRS+9XxsML8ZJHASNT94jC/iGe5v6sSTyfkbAqjIp0Oc5+Ke5+TWA== In-Reply-To: <229c1399-ce4b-b942-1bae-deea501f1c48@telenet.be> References: <229c1399-ce4b-b942-1bae-deea501f1c48@telenet.be> Date: Tue, 20 Sep 2022 11:19:35 +0200 Message-ID: <87k05y2yjc.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: text/plain X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" Reply-to: Josselin Poiret From: Josselin Poiret via Bug reports for GNU Guix X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663669131; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=was+lOdiCsW1NYT+V/FbuOX04brnrDwN29sZ00d6kqM=; b=QxZm8XuFg3ICjwyv9ltPtBk8Q7OY3mvj/3zm1jzZnolKB6tZbUBebaMq3dQcqkZn1nVTbc xXnDNPKa/f/8wu9sOua6X/u00Wo6UsNOna0IyNCuVME3W8qn0XNnhxjLWmVcZCM97l0i7p bAuM0rzJdj/2YI+QX+2McM8nmUhgCb0r2kCgSGVx7Ez1pbIJJV0hjynJM5phqG0R9ZK52K hN5kDYYtqZIC2nAhfxiVKz0gNg0xDUXak/fgaqQQ+1OCTK8bk+zhKvF2Ffafd1ZGv2mH3F /mIogrFylxsnu80D4Y39SJBs+fzqVs2fFmRCu/G0FrUOo8/IVSrvgGBDtgoznA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663669131; a=rsa-sha256; cv=none; b=KTrXITZvy4+0IkwNa/VH6K8FsDn6MBFO0oFyB9PE3hnTQWd4Ojugq0BOrrNQS3RKEoNwhr tzCxyTthKKweP2l5AqaJoMNjvQAegnGf7srhEPFrNk361ka2V16ztvPDWoe2ZQEpo+3pk3 F4mrxv+RZfU2jwWQ5y7Lmj00ch38w5W4OP4fV8xdo54eLbKRDod1mIvxPOH3uSSo4ZZrej anpq2FoSG1VYjhRaqtdr2c4XN80MccMImSGBiJhN6fwI0nOsdO8sDXxI/xG949cJorYM4B 8wY5fRvimAV/XVKUrro3NP2blISv3WDxlmA6josN5uDNGGXUa2xEoZnBJ1rVbw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=gAMyn4F2; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.84 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=gAMyn4F2; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 10C6B2D430 X-Spam-Score: -1.84 X-Migadu-Scanner: scn1.migadu.com X-TUID: hxBW7vir6TVP Hi everyone, Maxime Devos writes: > Here is a simpler reproducer for that error: > > file a.scm: > (use-modules (gnu packages) (guix packages) (guix gexp)) > (package > (inherit (specification->package "hello")) > (source (local-file "a.scm"))) > > guix build -f a.scm --source The issue is that package-source-derivation in guix/packages.scm doesn't actually always yield a derivation, since lower-object isn't guaranteed to do that: here the gexp compiler for local-file only returns a string denoting the file path of the interned store file. `guix build` relies on the (wrong) assumption that everything that it will build will end up being a derivation in some way or another, so just calls show-derivation-outputs on that, which then errors as above. build-derivations, contrary to its name, can also pass simple file names to build-things, and since the file will already be interned in the store at that point, it won't need to do anything, and there won't be any errors there. The simple fix would be to add another band-aid cond at the show-derivation-outputs call in build.scm, but it doesn't seem to be enough in the long term. What do people think? -- Josselin Poiret