From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <guix-devel-bounces+larch=yhetil.org@gnu.org>
Received: from mp10.migadu.com ([2001:41d0:403:478a::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms8.migadu.com with LMTPS
	id APIdLOG5NmVauQAAG6o9tA:P1
	(envelope-from <guix-devel-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Mon, 23 Oct 2023 20:22:25 +0200
Received: from aspmx1.migadu.com ([2001:41d0:403:478a::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp10.migadu.com with LMTPS
	id APIdLOG5NmVauQAAG6o9tA
	(envelope-from <guix-devel-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Mon, 23 Oct 2023 20:22:25 +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 6984A602C7
	for <larch@yhetil.org>; Mon, 23 Oct 2023 20:22:25 +0200 (CEST)
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=gmail.com header.s=20230601 header.b=iUWPF3ZR;
	spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org";
	dmarc=pass (policy=none) header.from=gmail.com
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1698085345;
	h=from:from:sender:sender: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:list-id:list-help:list-unsubscribe:
	 list-subscribe:list-post:dkim-signature;
	bh=VM0jOlibd6atBsQPDr1/ADsvSmlHu7Ledt4SO8KtN8w=;
	b=WMDXhTb+4lBvvuOWDpFANCY1SYeaUGkLqBg2WjoRWOC5B/Q0ankDwtQNzmSVNAlDV+mv6Z
	DouaxRHqPgWBNv4NGfjNI6nVjpAojKfNlrzUl8EWPd4Y+dGfR5QJRaM/82oTvmTxpFMdYV
	MUd82obW174adSInv8hiE+5liKGRH35wDcknUAls85EL6z9QZBfncVtnqGAQTbYOK9MaAc
	DCf2MkQVBn/deQf+UhvM4Ax8QsN3ARC6pivZl4UGRuAkJDhKuvAAcvPQjmMsfbWU46ZnhJ
	9muUJv4LnRzU+c+my7HEBL0o+Iqu5jeNnHHOJvZ+WbO8gr9Q/62qmV3E47ocqQ==
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698085345; a=rsa-sha256; cv=none;
	b=f6aLDBh1Np2d2yj2oOXHiptq6lMfydqM8iMDQ69p+U3BKsRI3YxM5iikqJMlF19jo7HDHI
	QkG5cNxsX9OfeKW7XbyhZMsszd3HldCBbT+buSKIpFhdO37v4hU3T0LweIdFv2GdQ4ep8r
	zbrBisKs9H2q52qATxwolRLF+VbgpLeuT9iwlqgEPB3skaok1SmF+W5UlClat6BA0KOBJ2
	W4KRFk9IAcLIWufuxusik1ylhlNqQCbBLNdL6U46XXoP8EFJ6gJXlykUKd91iyDTi+xlQH
	c15CO38+qYq3UAgQHV3ENA0FoXfkKpceeZSYUcBoIV3gpu26/ATH1aeg+rlmcw==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=gmail.com header.s=20230601 header.b=iUWPF3ZR;
	spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org";
	dmarc=pass (policy=none) header.from=gmail.com
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <guix-devel-bounces@gnu.org>)
	id 1quzYf-0004cT-1p; Mon, 23 Oct 2023 14:21:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <zimon.toutoune@gmail.com>)
 id 1quzYc-0004X0-TC
 for guix-devel@gnu.org; Mon, 23 Oct 2023 14:21:43 -0400
Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <zimon.toutoune@gmail.com>)
 id 1quzYb-0001EG-7P
 for guix-devel@gnu.org; Mon, 23 Oct 2023 14:21:42 -0400
Received: by mail-wm1-x329.google.com with SMTP id
 5b1f17b1804b1-408cd9660b8so5168015e9.1
 for <guix-devel@gnu.org>; Mon, 23 Oct 2023 11:21:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1698085299; x=1698690099; darn=gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:to:from
 :from:to:cc:subject:date:message-id:reply-to;
 bh=VM0jOlibd6atBsQPDr1/ADsvSmlHu7Ledt4SO8KtN8w=;
 b=iUWPF3ZRxkzE3xMs5Ko35uioRGW76Pip+h3eHJ410PcqIpuMPht52yWMFxSO9416cO
 1Fm44ht18IbCHoGR5yVUjFvEQAOMrre91WV+j2JjxvgE29KFwcLx9egUWvfew4dNSUkC
 a1DoK9cSfTQhJS6ys2QKzLLiZE70WY96v9Vq9ItEBwRIlrRvQsnMUsgJsQWctayY0UKn
 mytmThkQceP2pv576NPQbRHmwdyldOJWiw2RW3pZ0fGCnX3j+JIxMI9QTyQqn4Ot7P/0
 Z2Dbfw5Ff+5oXIrYNLwmY1gnAwLNsf50XbhFJJV16G4bSbI3lZ16hvxvtnIPfMnHw3eQ
 Oe+g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1698085299; x=1698690099;
 h=mime-version:message-id:date:references:in-reply-to:subject:to:from
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=VM0jOlibd6atBsQPDr1/ADsvSmlHu7Ledt4SO8KtN8w=;
 b=Q0LydjLHY7hUOOcrCGxr66a7ymSR0x4jH7jyIy60uF2MipRVh4ShPwDIXP2AxnNf9z
 nE439sLzdEWUUZB2itygYucwPk4pkViUjXGTfRb0jWxnJYU8nm6aCvaprRDqXyFw7l9l
 fptQHFz3xQo3U/q42SwtObUde/qFiLnNP8CFm4VOTlntfFCJSzL1iWp5L7uudcBIxSX6
 p6P+f8qZ8xVMR47mnHEAP7xQsBGxN3qSkyavnJOzb7eT9dJWkRXK+dLR0BkykmH0Hd82
 2T6HxFT2ATYujj154wFPlJffOgw/SB8Nl/ceBYKI2VrQdmM/HV4UwPn1KtJXfiWQwyHb
 UqQw==
X-Gm-Message-State: AOJu0Yz1f7HQERCBlmW1eOh9hWidjSWqPhybZWJrj5sx/yyelmAXQhEu
 XRwfj9wJyw7noFXlgBlN6hIkKEdqN94=
X-Google-Smtp-Source: AGHT+IF/OefQNwKT4kViqbcT6OJNZLSSdYS9fJyDlKlcjIGjf/SWXnoLYoE3x79+Nb7vgsy08BubNg==
X-Received: by 2002:adf:b1d3:0:b0:32d:c333:c1dd with SMTP id
 r19-20020adfb1d3000000b0032dc333c1ddmr6854419wra.7.1698085299401; 
 Mon, 23 Oct 2023 11:21:39 -0700 (PDT)
Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id
 f10-20020adff98a000000b0031aef72a021sm8290699wrr.86.2023.10.23.11.21.38
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 23 Oct 2023 11:21:38 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@gmail.com>
To: Greg Hogan <code@greghogan.com>, guix-devel <guix-devel@gnu.org>
Subject: Re: Order of manifest and overlapping binaries
In-Reply-To: <CA+3U0ZmuH9d7jjbYb5CVrBgvZExrPCBgOH-Z6oPjRE3yj_0KDg@mail.gmail.com>
References: <CA+3U0ZmuH9d7jjbYb5CVrBgvZExrPCBgOH-Z6oPjRE3yj_0KDg@mail.gmail.com>
Date: Mon, 23 Oct 2023 20:20:05 +0200
Message-ID: <877cndjj56.fsf@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::329;
 envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x329.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: guix-devel@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Development of GNU Guix and the GNU System distribution."
 <guix-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-devel>,
 <mailto:guix-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guix-devel>
List-Post: <mailto:guix-devel@gnu.org>
List-Help: <mailto:guix-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-devel>,
 <mailto:guix-devel-request@gnu.org?subject=subscribe>
Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org
Sender: guix-devel-bounces+larch=yhetil.org@gnu.org
X-Migadu-Flow: FLOW_IN
X-Migadu-Country: US
X-Spam-Score: -9.42
X-Migadu-Queue-Id: 6984A602C7
X-Migadu-Scanner: mx0.migadu.com
X-Migadu-Spam-Score: -9.42
X-TUID: KcE4q17WkisO

Hi,

On Tue, 16 May 2023 at 16:41, Greg Hogan <code@greghogan.com> wrote:

> I could not find documentation on this circumstance or how to resolve.
> Both 'parallel' and 'moreutils' produce a 'bin/parallel' and only one
> can go in the $GUIX_PROFILE.
>
> Creating a container, the latter package overshadows the former
> package, as below. Unclear if this is consistent. In my manifest the
> former package overshadows the latter (I'd prefer to have parallel's
> parallel, but by default I have sorted the listing alphabetically). Is
> there a better way to fix this?
>
> --8<---------------cut here---------------start------------->8---
> $ guix shell --container moreutils parallel which coreutils
> [env]$ readlink -f `which parallel`
> /gnu/store/xd9kbadmrrbpkjs9vl1v9rhgayfxwgbc-parallel-20230422/bin/parallel
>
> guix shell --container parallel moreutils which coreutils
> [env]$ readlink -f $(which parallel)
> /gnu/store/60zdm9zm0nqm5d97vs30sf4plb2ib5p9-moreutils-0.67/bin/parallel
> --8<---------------cut here---------------end--------------->8---

Command-line is parsed from right to left.  Therefore, it is consistent.

However, when using manifest, it is parsed from left to right.  See
#43585 [1].  Compare:

--8<---------------cut here---------------start------------->8---
$ cat moreutils-parallel.scm
(specifications->manifest
 (list "moreutils" "parallel"))

$ guix shell -C -m moreutils-parallel.scm coreutils which
[env]$ readlink -f $(which parallel)
/gnu/store/60zdm9zm0nqm5d97vs30sf4plb2ib5p9-moreutils-0.67/bin/parallel

$ guix shell -C moreutils parallel coreutils which
[env]$ readlink -f $(which parallel)
/gnu/store/wi3j9z1s5pdna43ccyjf6c5pa1gnpg4x-parallel-20230622/bin/parallel
--8<---------------cut here---------------end--------------->8---

versus

--8<---------------cut here---------------start------------->8---
$ cat parallel-moreutils.scm
(specifications->manifest
 (list "parallel" "moreutils"))

$ guix shell -C -m parallel-moreutils.scm coreutils which
[env]$ readlink -f $(which parallel)
/gnu/store/wi3j9z1s5pdna43ccyjf6c5pa1gnpg4x-parallel-20230622/bin/parallel

$ guix shell -C parallel moreutils coreutils which
[env]$ readlink -f $(which parallel)
/gnu/store/60zdm9zm0nqm5d97vs30sf4plb2ib5p9-moreutils-0.67/bin/parallel
--8<---------------cut here---------------end--------------->8---

Well, I do not know if it is a feature or a bug. :-)

Especially when command-lines are not all consistent.

--8<---------------cut here---------------start------------->8---
$ guix show moreutils parallel | recsel -Cp name
name: moreutils
name: parallel

$ guix show parallel moreutils | recsel -Cp name
name: parallel
name: moreutils
--8<---------------cut here---------------end--------------->8---


Cheers,
simon


1: https://issues.guix.gnu.org/43585#2