about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-24T15·11+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-24T15·11+0200
commit1a44f1cb656557715d328818270b82c0c13d58a0 (patch)
tree88fe68bcbe3a3f51b19a7287d77f5d1a2cef1722 /src
parent7f7d4ab68649b2f5530143e8cfa95fc785ae9937 (diff)
nix-copy-closure: Drop --bzip2, --xz, --show-progress
These are too difficult to implement via nix-store --serve.

‘--show-progress’ could be re-implemented fairly easily via a
sink/source wrapper class.
Diffstat (limited to 'src')
-rw-r--r--src/nix-store/nix-store.cc33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index f2621a9954bf..932789f2c071 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -956,39 +956,8 @@ static void opServe(Strings opFlags, Strings opArgs)
 
             case cmdImportPaths: {
                 if (!writeAllowed) throw Error("importing paths is not allowed");
-                string compression = readString(in);
-
-                if (compression != "") {
-                    if (compression != "gzip" && compression != "bzip2" && compression != "xz")
-                        throw Error(format("unsupported compression method `%1%'") % compression);
-
-                    Pipe fromDecompressor;
-                    fromDecompressor.create();
-
-                    Pid pid = startProcess([&]() {
-                        fromDecompressor.readSide.close();
-                        if (dup2(fromDecompressor.writeSide, STDOUT_FILENO) == -1)
-                            throw SysError("dupping stdout");
-                        // FIXME: use absolute path.
-                        execlp(compression.c_str(), compression.c_str(), "-d", NULL);
-                        throw SysError(format("executing `%1%'") % compression);
-                    });
-
-                    fromDecompressor.writeSide.close();
-
-                    FdSource fromDecompressor_(fromDecompressor.readSide);
-                    store->importPaths(false, fromDecompressor_);
-
-                    pid.wait(true);
-                } else
-                    store->importPaths(false, in);
-
+                store->importPaths(false, in);
                 writeInt(1, out); // indicate success
-
-                /* The decompressor will have left stdin in an
-                   undefined state, so we can't continue. */
-                if (compression != "") return;
-
                 break;
             }