From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 2PNcHdtyNmUtyQAA9RJhRA:P1 (envelope-from ) for ; Mon, 23 Oct 2023 15:19:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2PNcHdtyNmUtyQAA9RJhRA (envelope-from ) for ; Mon, 23 Oct 2023 15:19:23 +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 1DB9760525 for ; Mon, 23 Oct 2023 15:19:23 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=greghogan-com.20230601.gappssmtp.com header.s=20230601 header.b=iWEDC2q7; 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=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698067163; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=m39WrXHNlIXBMgXcOzDjT7Qcp9WFhF4UJ0peYHmtgAA=; b=h3XG5iLX0Gmvv7XeIeiY5q+oNW6XTHszhsbNlSp34yLpaIVjujVcYDGZjtDcT1jwJxED9B BVYh1bYctthO19UCtANttO1gLwzrvwrsK/eoHmbNeaGzBXrlcBRC3R9FFURpfYb5hwQZae pYPSLOn9sfKSGV+DoKl7u2FFOTz6Qfa2Fs0MBAF54cfkHMVzoGlYLuBnCxWsIm/F6nxD21 YGp5njcqbP97rrLMK2jyuTlY0HwxGx+i7r46U7mnL/MoyatTyMCGUvZiLhHGSzCDRRzsac hAnZNnqXaSSIuygLK7qOtpdOrXE22z3xjrF+fbJ8FjowoDhEDosJxeL1V7NOgQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698067163; a=rsa-sha256; cv=none; b=o4ybmvz78lekhPz8zmvyHM1bW8u9TxiHsejvqjpuE0ukEydK9Kl06z3XCDaUY+mX/oK7Aq 8CQSOPaAoN1fNL2xzm6ivzQXmy9Z8nVuh79uTWLOBvXlOsMiuaCVM7sBu7surgg5YhhZX6 UhuW+UJxPyLkEBStk+EH2n936MM9ehOQr8jmSuxYjV2GQvHmWvZjUimBkBQ8sv7rqrNhcO hDcKnU2ulzl6vPv1c9V5ahUIW/aJQiX6CTkbDjfJFRj3CpXpec7roQhvsCyyTWf15LYSdv snTcdego1gp+qRUSIlek4++YWGWnlIavK7jtLE7DNTZuCBfT7uic5vr1Y7iFdQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=greghogan-com.20230601.gappssmtp.com header.s=20230601 header.b=iWEDC2q7; 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=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quupS-0005QD-93; Mon, 23 Oct 2023 09:18:46 -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 ) id 1quupQ-0005Pu-MC for guix-devel@gnu.org; Mon, 23 Oct 2023 09:18:44 -0400 Received: from mail-yw1-x112f.google.com ([2607:f8b0:4864:20::112f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1quupO-0002PD-Ih for guix-devel@gnu.org; Mon, 23 Oct 2023 09:18:44 -0400 Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-5a8ee23f043so34142247b3.3 for ; Mon, 23 Oct 2023 06:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=greghogan-com.20230601.gappssmtp.com; s=20230601; t=1698067121; x=1698671921; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=m39WrXHNlIXBMgXcOzDjT7Qcp9WFhF4UJ0peYHmtgAA=; b=iWEDC2q7UFDLbUN335kdsNlQPd6fsLaWuymKLDJHUlz7a/pwF9Pf9zunISvv0DisUB 5j3liWJ6Lk0aw1TYwO/CfjcifWOTTk0wU7W9tv9uojNzCjwYs1qlf50N1TVT11MzsoTt S86oaRlbv05Acp+5dg0mTV23k/Oyc/b2qdUe2s3rAStgspd6BsDf1u2ELXDIph8BI6hv rxHYphmjNRf5kKxY+xNhYbFJ5eBWSb+RrJk5QurdfOAX/ZChCSjn9/fKYhDsTAlo21rl tGxI+qCDJCfrB40HdFIHYN8uv0vxZDLevaWZuk07TnY0EriVmyPEJ44mb9k81/jnY9PG oYsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698067121; x=1698671921; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m39WrXHNlIXBMgXcOzDjT7Qcp9WFhF4UJ0peYHmtgAA=; b=k+8VQjirgLziedGR6zvSURvsOHDnrkuyd2hRuEhbzlNCluLLOt5Sk0n1fDFzYHOIkY FoX9PKIsOCa4d4oeXIumeOCBymn1nhJQLTX2qqV4DeFfCCle5fObLDexzDYf4DyHSJ3E zkv2QLJwtVBBRKfKtcNZuu5SoC+yv5ya5vdijdOo3a/RnWFrRDJaBL7cEewl67hl70Av 1HD1PYZxtQwHzTvcXhF1tTj2JA2QKphTKRtTFo+xXcVxEbQRyjDEVld6UKvSmx75tg7F pqhjQ34JdVjyU4Sa/8ymNn2L5EHXuZd7UEJ92cVoBiELNxd+FC5iWOB9CRCW0vcc+0eU 6SiQ== X-Gm-Message-State: AOJu0YwlJNJusLPN5Ornw5QscFXjG5gzAA/qpCsrJjSwvUqBZu6SlyMA i/xBC4jjEYwk8NUtMb2r0ZypDKNdrPFhiVJTnSzsEx89Qh5FTpLPKhE= X-Google-Smtp-Source: AGHT+IGrvtNPAyHY6Lg5tN63m1tFEcFu4Zn05zNpUFsiLX0Tilq5z16SaGnYxbbd0UnzbY6jMPC2wJoYI6uxrvYtsXo= X-Received: by 2002:a0d:e80c:0:b0:5a7:af97:c787 with SMTP id r12-20020a0de80c000000b005a7af97c787mr9962634ywe.11.1698067121041; Mon, 23 Oct 2023 06:18:41 -0700 (PDT) MIME-Version: 1.0 References: <87edngkndl.fsf@riseup.net> In-Reply-To: <87edngkndl.fsf@riseup.net> From: Greg Hogan Date: Mon, 23 Oct 2023 09:18:30 -0400 Message-ID: Subject: Re: Order of manifest and overlapping binaries To: Csepp Cc: guix-devel@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: none client-ip=2607:f8b0:4864:20::112f; envelope-from=code@greghogan.com; helo=mail-yw1-x112f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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: -8.74 X-Migadu-Queue-Id: 1DB9760525 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -8.74 X-TUID: /5RLfNKT5t8v On Tue, May 16, 2023 at 4:55=E2=80=AFPM Csepp wrote: > > > Greg Hogan writes: > > > 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? > > > > Greg > > > > --8<---------------cut here---------------start------------->8--- > > $ guix shell --container moreutils parallel which coreutils > > [env]$ readlink -f `which parallel` > > /gnu/store/xd9kbadmrrbpkjs9vl1v9rhgayfxwgbc-parallel-20230422/bin/paral= lel > > > > 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--- > > > > > > This is operating from a recent guix pull: > > > > --8<---------------cut here---------------start------------->8--- > > $ guix describe > > Generation 44 May 11 2023 17:02:53 (current) > > guix d6f6b57 > > repository URL: https://git.savannah.gnu.org/git/guix.git > > branch: master > > commit: d6f6b57766e95d2fa8af63d4460a2b303ca4d867 > > --8<---------------cut here---------------end--------------->8--- > > You could create a package that just copies the contents of moreutils > to $output, but renames some files, then include the resulting package > in your manifest. If moreutils is not propagated from any other > package, then you don't even have to do an input rewrite. I'm still cutting my teeth on Scheme, and this looks like a simple error, but the following from my manifest results in the error below. The function accepts a package to inherit from and a list of files to rename by appending the package name. This works if I change to pass in a single string and create the list within the for-each argument. (define (rename-files parent-package files) (package/inherit parent-package (arguments (substitute-keyword-arguments (package-arguments parent-package) ((#:phases phases #~%standard-phases) #~(modify-phases #$phases (add-after 'install 'rename-files (lambda* (#:key outputs #:allow-other-keys) (let ((out #$output) (name #$(package-name parent-package)= )) (for-each (lambda (file) (rename-file (string-append out "/" file) (string-append out "/" file "-" name))) #$files)))))))))) (define moreutils-decollide (rename-files moreutils (list "bin/parallel"))) --8<---------------cut here---------------start------------->8--- starting phase `rename-files' error: in phase 'rename-files': uncaught exception: wrong-type-arg #f "Wrong type to apply: ~S" ("bin/parallel") ("bin/parallel= ") phase `rename-files' failed after 0.0 seconds Backtrace: 9 (primitive-load "/gnu/store/qrj9l194a552vpg2234xx55k76j=E2=80= =A6") In guix/build/gnu-build-system.scm: 908:2 8 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #) In ice-9/boot-9.scm: 1752:10 7 (with-exception-handler _ _ #:unwind? _ # _) In srfi/srfi-1.scm: 634:9 6 (for-each # =E2=80=A6) In ice-9/boot-9.scm: 1752:10 5 (with-exception-handler _ _ #:unwind? _ # _) In guix/build/gnu-build-system.scm: 929:23 4 (_) In ice-9/eval.scm: 159:9 3 (_ #(#(#(#) (#)) =E2=80= =A6)) 159:9 2 (_ _) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: Wrong type to apply: "bin/parallel" --8<---------------cut here---------------end--------------->8---