From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#36544: 'set-paths' should exclude 'source' from consideration Date: Thu, 11 Jul 2019 23:24:55 +0200 Message-ID: <87sgrcnu1k.fsf@inria.fr> References: <871rz1a0kr.fsf@netris.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:470:142:3::10]:50305) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlgZq-0004ia-K7 for bug-guix@gnu.org; Thu, 11 Jul 2019 17:26:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlgZo-0006Fh-NA for bug-guix@gnu.org; Thu, 11 Jul 2019 17:26:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58338) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hlgZm-0006Db-87 for bug-guix@gnu.org; Thu, 11 Jul 2019 17:26:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hlgZm-0000Ca-20 for bug-guix@gnu.org; Thu, 11 Jul 2019 17:26:02 -0400 In-Reply-To: <871rz1a0kr.fsf@netris.org> Sender: "Debbugs-submit" Resent-Message-ID: List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Mark H Weaver Cc: 36544@debbugs.gnu.org Hello, Mark H Weaver skribis: > The 'set-paths' phase in (guix build gnu-build-system) currently > includes 'source' in the set of candidates for inclusion in the > search-path variables. Oh, that was certainly not intended. > First of all, I think it's undesirable to include subdirectories of the > source directory in these search paths. However, if you think it's > desirable, there's another problem: it's fragile. It depends on: > > (1) whether the source is a tarball or an unpacked checkout, and > (2) whether the subdirectories specified in the search-paths > (e.g. 'include') are within the top source directory. > > Currently, if you change the 'source' field of a package from a tarball > to an (unpacked) VCS checkout, there *might* be additional components > added to the environment variables, depending on the source tree layout. > > For example, this causes our 'linux-libre' package to fail to build if > you substitute its 'source' field for a git checkout, as Chris Webber > discovered here: > > https://lists.gnu.org/archive/html/help-guix/2019-07/msg00058.html > https://lists.gnu.org/archive/html/help-guix/2019-07/msg00062.html > > Also, if any package depends on the current behavior, it will break if > its 'source' is changed from a VCS checkout to a release tarball. Indeed, that=E2=80=99s terrible. I suppose we were just lucky not to hit s= uch issues before! > To avoid this unexpected sensitivity on the source origin method, I > suggest that we explicitly exclude 'source' from consideration within > the 'set-paths' phase. What do you think? I agree. We should do that in the next =E2=80=98core-updates=E2=80=99. Ludo=E2=80=99.