From patchwork Sat Sep 10 17:20:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: M X-Patchwork-Id: 42444 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id F265727BBEA; Sat, 10 Sep 2022 18:22:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9476627BBE9 for ; Sat, 10 Sep 2022 18:22:10 +0100 (BST) Received: from localhost ([::1]:46104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oX4BF-0004Le-QB for patchwork@mira.cbaines.net; Sat, 10 Sep 2022 13:22:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX4B8-0004LE-Eh for guix-patches@gnu.org; Sat, 10 Sep 2022 13:22:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51627) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oX4B8-0005XP-4G for guix-patches@gnu.org; Sat, 10 Sep 2022 13:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oX4B7-0007y6-Vu for guix-patches@gnu.org; Sat, 10 Sep 2022 13:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57718] [PATCH 1/3] daemon: Remove unused function openStore. References: <10bde1ed-a065-d9e2-eec8-22a45da6042a@telenet.be> In-Reply-To: <10bde1ed-a065-d9e2-eec8-22a45da6042a@telenet.be> Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 10 Sep 2022 17:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57718 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57718@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 57718-submit@debbugs.gnu.org id=B57718.166283048830565 (code B ref 57718); Sat, 10 Sep 2022 17:22:01 +0000 Received: (at 57718) by debbugs.gnu.org; 10 Sep 2022 17:21:28 +0000 Received: from localhost ([127.0.0.1]:40320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX4Aa-0007wv-Dw for submit@debbugs.gnu.org; Sat, 10 Sep 2022 13:21:28 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:42304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX4AW-0007wf-Oj for 57718@debbugs.gnu.org; Sat, 10 Sep 2022 13:21:26 -0400 Received: from localhost.localdomain ([188.189.47.0]) by andre.telenet-ops.be with bizsmtp id JHMJ2800200EV6401HMMBS; Sat, 10 Sep 2022 19:21:23 +0200 From: Maxime Devos Date: Sat, 10 Sep 2022 19:20:38 +0200 Message-Id: <20220910172040.6469-1-maximedevos@telenet.be> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1662830483; bh=oqYTP3UIKUpbjw2+8t7xEvWW0DUR6KoPTJUAmPVN1dA=; h=From:To:Cc:Subject:Date; b=D3n1wZHxgmW12MQEKPaJ0i1is65qT1p3CTPgL93Ct9jCNI87FmNLx6y44rf3XyjDl uL/tnPl8ltXv6iHhP0fRRW5pU6rLsAICXQJiQ7H8K6QDiqxSo5pN3xkUbf8GvZ8a6J J3kgDM3ljIzajWgWVNHnoASrefLjcfL+D5NxNY5LGxIOMQ9wKSVgqCIX27ah/dhmJ3 fpn4Ko3AmqRVeo79HaZ68QEyQrttvgjjDTmtkdmleXzrfjcCWwbZdgv+F8u8Swfy4u wgg+zBaJ9c05QsewWFL2Gy3R7rETB/qOIhqKf1dq+JJ2E4Tm8jbL9cjKXjC2bBujxT Ff7/xB/oQtx3w== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * nix/libstore/store-api.cc (openStore): Remove it. * nix/libstore/store-api.hh (openStore): Likewise. --- nix/libstore/store-api.cc | 6 ------ nix/libstore/store-api.hh | 5 ----- 2 files changed, 11 deletions(-) base-commit: 17f646aeba39f0d297f6c911d83b3bd9e88a227b prerequisite-patch-id: 1f7c45cf2480f4e6f1e9563660e1b73a8682425e prerequisite-patch-id: 0caac311875ee39cb48573657ebb960e90da6dfb prerequisite-patch-id: 418285493d89ebf102175902d9b09a0174e88190 prerequisite-patch-id: 3c39eb839d9d3ff3fca6cd98621a5d5c411b7af4 diff --git a/nix/libstore/store-api.cc b/nix/libstore/store-api.cc index 0de0b6b298..e3a8ac0995 100644 --- a/nix/libstore/store-api.cc +++ b/nix/libstore/store-api.cc @@ -277,10 +277,4 @@ namespace nix { std::shared_ptr store; -std::shared_ptr openStore(bool reserveSpace) -{ - return std::shared_ptr(new LocalStore(reserveSpace)); -} - - } diff --git a/nix/libstore/store-api.hh b/nix/libstore/store-api.hh index 7d2ad2270d..0693085a25 100644 --- a/nix/libstore/store-api.hh +++ b/nix/libstore/store-api.hh @@ -365,11 +365,6 @@ Paths topoSortPaths(StoreAPI & store, const PathSet & paths); extern std::shared_ptr store; -/* Factory method: open the Nix database, either through the local or - remote implementation. */ -std::shared_ptr openStore(bool reserveSpace = true); - - /* Display a set of paths in human-readable form (i.e., between quotes and separated by commas). */ string showPaths(const PathSet & paths); From patchwork Sat Sep 10 17:20:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: M X-Patchwork-Id: 42445 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7EBC827BBEA; Sat, 10 Sep 2022 18:22:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1C5C927BBE9 for ; Sat, 10 Sep 2022 18:22:11 +0100 (BST) Received: from localhost ([::1]:46106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oX4BG-0004MD-9w for patchwork@mira.cbaines.net; Sat, 10 Sep 2022 13:22:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX4B8-0004LL-NA for guix-patches@gnu.org; Sat, 10 Sep 2022 13:22:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oX4B8-0005XU-F9 for guix-patches@gnu.org; Sat, 10 Sep 2022 13:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oX4B8-0007yD-B6 for guix-patches@gnu.org; Sat, 10 Sep 2022 13:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57718] [PATCH 2/3] daemon: Remove unused function exportPaths. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 10 Sep 2022 17:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57718 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57718@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 57718-submit@debbugs.gnu.org id=B57718.166283049130580 (code B ref 57718); Sat, 10 Sep 2022 17:22:02 +0000 Received: (at 57718) by debbugs.gnu.org; 10 Sep 2022 17:21:31 +0000 Received: from localhost ([127.0.0.1]:40324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX4Ac-0007x9-PV for submit@debbugs.gnu.org; Sat, 10 Sep 2022 13:21:31 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:42304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX4AZ-0007wf-71 for 57718@debbugs.gnu.org; Sat, 10 Sep 2022 13:21:27 -0400 Received: from localhost.localdomain ([188.189.47.0]) by andre.telenet-ops.be with bizsmtp id JHMJ2800200EV6401HMPBi; Sat, 10 Sep 2022 19:21:26 +0200 From: Maxime Devos Date: Sat, 10 Sep 2022 19:20:39 +0200 Message-Id: <20220910172040.6469-2-maximedevos@telenet.be> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220910172040.6469-1-maximedevos@telenet.be> References: <20220910172040.6469-1-maximedevos@telenet.be> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1662830486; bh=clO4I+9BDlfs8SMaJjf5+J19F6kz3pWzq50qP/rAYyE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bQhI7gbdHXL6wkehITR/QeOxqcez8WJQWKAm3z9/y9UimwrJ25HYb5bjMFEHeX2E5 m03g2/cmHrBK5A5qsJqPuoAMjRUTN7sv7Yb5AzVdHDb4chdawMKYlnX6L4VfxzCk5X 4MPHDeGhkoBXqHAbFTlm+VJy67Mrhn+c8bU8YZMdt9Ky4bD7jn38HNoczJT49fdK+8 +ssdtYTEAp4nM4Yr/+iaZ+jOckizrrXPj0x164/Wqdbl7KiMUx3UslNytzdpT8jVhl RHC8+FZaMfbtjIvmtTakCYVJUk0kC5q4fC+ahsOwwD0r1cjuk7l3ALeKHE+u80v/s3 V7CvgJqm4AZjg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * nix/libstore/store-api.cc (exportPaths): Remove it. * nix/libstore/store-api.hh (exportPaths): Likewise. --- nix/libstore/store-api.cc | 11 ----------- nix/libstore/store-api.hh | 7 ------- 2 files changed, 18 deletions(-) diff --git a/nix/libstore/store-api.cc b/nix/libstore/store-api.cc index e3a8ac0995..781fb9e693 100644 --- a/nix/libstore/store-api.cc +++ b/nix/libstore/store-api.cc @@ -236,17 +236,6 @@ string showPaths(const PathSet & paths) return s; } - -void exportPaths(StoreAPI & store, const Paths & paths, - bool sign, Sink & sink) -{ - foreach (Paths::const_iterator, i, paths) { - writeInt(1, sink); - store.exportPath(*i, sign, sink); - } - writeInt(0, sink); -} - Path readStorePath(Source & from) { Path path = readString(from); diff --git a/nix/libstore/store-api.hh b/nix/libstore/store-api.hh index 0693085a25..82a79e50e2 100644 --- a/nix/libstore/store-api.hh +++ b/nix/libstore/store-api.hh @@ -369,13 +369,6 @@ extern std::shared_ptr store; and separated by commas). */ string showPaths(const PathSet & paths); - -/* Export multiple paths in the format expected by ‘nix-store - --import’. */ -void exportPaths(StoreAPI & store, const Paths & paths, - bool sign, Sink & sink); - - MakeError(SubstError, Error) MakeError(BuildError, Error) /* denotes a permanent build failure */ From patchwork Sat Sep 10 17:20:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: M X-Patchwork-Id: 42446 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7A11227BBEA; Sat, 10 Sep 2022 18:22:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 350A327BBE9 for ; Sat, 10 Sep 2022 18:22:17 +0100 (BST) Received: from localhost ([::1]:33718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oX4BM-0004dW-Cs for patchwork@mira.cbaines.net; Sat, 10 Sep 2022 13:22:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX4B9-0004LU-2s for guix-patches@gnu.org; Sat, 10 Sep 2022 13:22:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51629) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oX4B8-0005Xb-Qz for guix-patches@gnu.org; Sat, 10 Sep 2022 13:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oX4B8-0007yK-Mk for guix-patches@gnu.org; Sat, 10 Sep 2022 13:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57718] [PATCH 3/3] daemon: Remove unused function findOutput. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 10 Sep 2022 17:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57718 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57718@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 57718-submit@debbugs.gnu.org id=B57718.166283049130588 (code B ref 57718); Sat, 10 Sep 2022 17:22:02 +0000 Received: (at 57718) by debbugs.gnu.org; 10 Sep 2022 17:21:31 +0000 Received: from localhost ([127.0.0.1]:40326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX4Ad-0007xB-A9 for submit@debbugs.gnu.org; Sat, 10 Sep 2022 13:21:31 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:42304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX4Ab-0007wf-8B for 57718@debbugs.gnu.org; Sat, 10 Sep 2022 13:21:29 -0400 Received: from localhost.localdomain ([188.189.47.0]) by andre.telenet-ops.be with bizsmtp id JHMJ2800200EV6401HMTCC; Sat, 10 Sep 2022 19:21:28 +0200 From: Maxime Devos Date: Sat, 10 Sep 2022 19:20:40 +0200 Message-Id: <20220910172040.6469-3-maximedevos@telenet.be> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220910172040.6469-1-maximedevos@telenet.be> References: <20220910172040.6469-1-maximedevos@telenet.be> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1662830489; bh=nUa0BMUJ271mL0IEw9C+/5SBrDNfS8saspJksUQKJQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=eNSjJ37O/0aUzL00uClHS2gVBoDrU3h4ghKEorJ9b52WU0z2I6654IOeq5PHB0Qss fne8TDmtva8m6eCUtFI94WrosIJS/49drIK2oyZMWwT4uVEMQDu+qsgrYzocyQPj7n O2LHKU34Lfc1+rv/1DDK9bJWLPvoX/U1VIjvE4BZPy8hAWyo/rk/zfIIYPNGeQi1PF uKEPyCgmFOlCDbIZHth2BkUp1Jjq9OF5lEBjsjiN50IYDPJo3zBb3//DhoemfoHi6P eHneudqY4Ay4HJqyWnATqJF+N6o91gjEjDBM5cTqjMTo+ABa61sVWcqeoZpee11RWk lnHjroPKXmYZw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * nix/libstore/misc.cc (findOutput): Remove it. * nix/libstore/misc.hh (findOutput): Likewise. --- nix/libstore/misc.cc | 8 -------- nix/libstore/misc.hh | 4 ---- 2 files changed, 12 deletions(-) diff --git a/nix/libstore/misc.cc b/nix/libstore/misc.cc index 97618089bd..d4e6d1b4af 100644 --- a/nix/libstore/misc.cc +++ b/nix/libstore/misc.cc @@ -59,14 +59,6 @@ void computeFSClosure(StoreAPI & store, const Path & path, } -Path findOutput(const Derivation & drv, string id) -{ - foreach (DerivationOutputs::const_iterator, i, drv.outputs) - if (i->first == id) return i->second.path; - throw Error(format("derivation has no output `%1%'") % id); -} - - static void dfsVisit(StoreAPI & store, const PathSet & paths, const Path & path, PathSet & visited, Paths & sorted, PathSet & parents) diff --git a/nix/libstore/misc.hh b/nix/libstore/misc.hh index edbf24047e..f70cda9fd0 100644 --- a/nix/libstore/misc.hh +++ b/nix/libstore/misc.hh @@ -21,10 +21,6 @@ void computeFSClosure(StoreAPI & store, const Path & path, PathSet & paths, bool flipDirection = false, bool includeOutputs = false, bool includeDerivers = false); -/* Return the path corresponding to the output identifier `id' in the - given derivation. */ -Path findOutput(const Derivation & drv, string id); - bool willBuildLocally(const Derivation & drv); bool substitutesAllowed(const Derivation & drv);