unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#57718] [PATCH 0/3] daemon: Remove unused code.
@ 2022-09-10 17:18 Maxime Devos
  2022-09-10 17:20 ` [bug#57718] [PATCH 1/3] daemon: Remove unused function openStore Maxime Devos
  0 siblings, 1 reply; 5+ messages in thread
From: Maxime Devos @ 2022-09-10 17:18 UTC (permalink / raw)
  To: 57718


[-- Attachment #1.1.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#57718] [PATCH 1/3] daemon: Remove unused function openStore.
  2022-09-10 17:18 [bug#57718] [PATCH 0/3] daemon: Remove unused code Maxime Devos
@ 2022-09-10 17:20 ` Maxime Devos
  2022-09-10 17:20   ` [bug#57718] [PATCH 2/3] daemon: Remove unused function exportPaths Maxime Devos
  2022-09-10 17:20   ` [bug#57718] [PATCH 3/3] daemon: Remove unused function findOutput Maxime Devos
  0 siblings, 2 replies; 5+ messages in thread
From: Maxime Devos @ 2022-09-10 17:20 UTC (permalink / raw)
  To: 57718; +Cc: Maxime Devos

* 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(-)

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<StoreAPI> store;
 
 
-std::shared_ptr<StoreAPI> openStore(bool reserveSpace)
-{
-    return std::shared_ptr<StoreAPI>(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<StoreAPI> store;
 
 
-/* Factory method: open the Nix database, either through the local or
-   remote implementation. */
-std::shared_ptr<StoreAPI> 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);

base-commit: 17f646aeba39f0d297f6c911d83b3bd9e88a227b
prerequisite-patch-id: 1f7c45cf2480f4e6f1e9563660e1b73a8682425e
prerequisite-patch-id: 0caac311875ee39cb48573657ebb960e90da6dfb
prerequisite-patch-id: 418285493d89ebf102175902d9b09a0174e88190
prerequisite-patch-id: 3c39eb839d9d3ff3fca6cd98621a5d5c411b7af4
-- 
2.37.2





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#57718] [PATCH 2/3] daemon: Remove unused function exportPaths.
  2022-09-10 17:20 ` [bug#57718] [PATCH 1/3] daemon: Remove unused function openStore Maxime Devos
@ 2022-09-10 17:20   ` Maxime Devos
  2022-09-10 17:20   ` [bug#57718] [PATCH 3/3] daemon: Remove unused function findOutput Maxime Devos
  1 sibling, 0 replies; 5+ messages in thread
From: Maxime Devos @ 2022-09-10 17:20 UTC (permalink / raw)
  To: 57718; +Cc: Maxime Devos

* 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<StoreAPI> 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 */
 
-- 
2.37.2





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#57718] [PATCH 3/3] daemon: Remove unused function findOutput.
  2022-09-10 17:20 ` [bug#57718] [PATCH 1/3] daemon: Remove unused function openStore Maxime Devos
  2022-09-10 17:20   ` [bug#57718] [PATCH 2/3] daemon: Remove unused function exportPaths Maxime Devos
@ 2022-09-10 17:20   ` Maxime Devos
  2022-09-11 13:54     ` bug#57718: [PATCH 0/3] daemon: Remove unused code Mathieu Othacehe
  1 sibling, 1 reply; 5+ messages in thread
From: Maxime Devos @ 2022-09-10 17:20 UTC (permalink / raw)
  To: 57718; +Cc: Maxime Devos

* 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);
-- 
2.37.2





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#57718: [PATCH 0/3] daemon: Remove unused code.
  2022-09-10 17:20   ` [bug#57718] [PATCH 3/3] daemon: Remove unused function findOutput Maxime Devos
@ 2022-09-11 13:54     ` Mathieu Othacehe
  0 siblings, 0 replies; 5+ messages in thread
From: Mathieu Othacehe @ 2022-09-11 13:54 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 57718-done


Applied, thanks!

Mathieu




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-11 13:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-10 17:18 [bug#57718] [PATCH 0/3] daemon: Remove unused code Maxime Devos
2022-09-10 17:20 ` [bug#57718] [PATCH 1/3] daemon: Remove unused function openStore Maxime Devos
2022-09-10 17:20   ` [bug#57718] [PATCH 2/3] daemon: Remove unused function exportPaths Maxime Devos
2022-09-10 17:20   ` [bug#57718] [PATCH 3/3] daemon: Remove unused function findOutput Maxime Devos
2022-09-11 13:54     ` bug#57718: [PATCH 0/3] daemon: Remove unused code Mathieu Othacehe

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).