From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id e6ofAYuVx1/jLgAA0tVLHw (envelope-from ) for ; Wed, 02 Dec 2020 13:24:27 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id gNMjOIqVx1/rXQAAbx9fmQ (envelope-from ) for ; Wed, 02 Dec 2020 13:24:26 +0000 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 BFD6C940148 for ; Wed, 2 Dec 2020 13:24:26 +0000 (UTC) Received: from localhost ([::1]:42280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkS7N-00062Z-OA for larch@yhetil.org; Wed, 02 Dec 2020 08:24:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkS70-0005om-Np for bug-guix@gnu.org; Wed, 02 Dec 2020 08:24:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kkS70-0004MN-Gn for bug-guix@gnu.org; Wed, 02 Dec 2020 08:24:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kkS70-00068k-Dr for bug-guix@gnu.org; Wed, 02 Dec 2020 08:24:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#23874: [PATCH 2/2] profiles: Delete duplicate manifest entries in packages->manifest. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 02 Dec 2020 13:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23874 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 23874@debbugs.gnu.org Received: via spool by 23874-submit@debbugs.gnu.org id=B23874.160691540423544 (code B ref 23874); Wed, 02 Dec 2020 13:24:02 +0000 Received: (at 23874) by debbugs.gnu.org; 2 Dec 2020 13:23:24 +0000 Received: from localhost ([127.0.0.1]:34731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkS6N-00067b-RJ for submit@debbugs.gnu.org; Wed, 02 Dec 2020 08:23:24 -0500 Received: from mailrelay.tugraz.at ([129.27.2.202]:39952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkS6L-00067L-Pl for 23874@debbugs.gnu.org; Wed, 02 Dec 2020 08:23:22 -0500 Received: from localhost.localdomain (217-149-166-73.nat.highway.telekom.at [217.149.166.73]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4CmKRC2Qh0z3x85 for <23874@debbugs.gnu.org>; Wed, 2 Dec 2020 14:23:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1606915399; bh=0kZnLpD5WbBA84gSvMSOGC6Ps3LXWG/p/7yfbFUvZj0=; h=From:To:Subject:Date:In-Reply-To:References; b=Ph8n7gY9dAjT4r4RbnUfqp1lMiSjCSYJ6JWSBkj+K+3nr8nLyIBSH7kjJEgj6J9wX oIw9vMIpua23lxKbLLFPNLhl1W7dEXAHWxU9zKDi6x2cY1bPI5nIxWL+G1QsSY7DqM EY0fJdktrCXNTey45z6nIuVuurboXUHhPo5bMhbM= From: Leo Prikler Date: Wed, 2 Dec 2020 14:22:44 +0100 Message-Id: <20201202132244.30694-2-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201202132244.30694-1-leo.prikler@student.tugraz.at> References: <20201202132244.30694-1-leo.prikler@student.tugraz.at> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 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" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 3.82 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=tugraz.at header.s=mailrelay header.b=Ph8n7gY9; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: BFD6C940148 X-Spam-Score: 3.82 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: N6LoySyI34GZ * gnu/profiles.scm (packages->manifest): Delete duplicate entries. --- guix/profiles.scm | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index 99b7dbf299..14b98852bd 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -399,22 +399,24 @@ denoting a specific output of a package." 'inferior-package->manifest-entry)) (manifest - (map (match-lambda - (((? package? package) output) - (package->manifest-entry package output)) - ((? package? package) - (package->manifest-entry package)) - ((thing output) - (if inferiors-loaded? - ((inferior->entry) thing output) - (throw 'wrong-type-arg 'packages->manifest - "Wrong package object: ~S" (list thing) (list thing)))) - (thing - (if inferiors-loaded? - ((inferior->entry) thing) - (throw 'wrong-type-arg 'packages->manifest - "Wrong package object: ~S" (list thing) (list thing))))) - packages))) + (delete-duplicates + (map (match-lambda + (((? package? package) output) + (package->manifest-entry package output)) + ((? package? package) + (package->manifest-entry package)) + ((thing output) + (if inferiors-loaded? + ((inferior->entry) thing output) + (throw 'wrong-type-arg 'packages->manifest + "Wrong package object: ~S" (list thing) (list thing)))) + (thing + (if inferiors-loaded? + ((inferior->entry) thing) + (throw 'wrong-type-arg 'packages->manifest + "Wrong package object: ~S" (list thing) (list thing))))) + packages) + manifest-entry=?))) (define (manifest->gexp manifest) "Return a representation of MANIFEST as a gexp." -- 2.29.2