From f09618b63a3e842adc59360c9bb4cf0ad37246ef Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 27 Oct 2004 10:24:44 +0000 Subject: [PATCH] * Turn on read-only mode in queries. This prevents redundant store I/O. --- src/nix-env/main.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc index f87c41312..c25cdb60c 100644 --- a/src/nix-env/main.cc +++ b/src/nix-env/main.cc @@ -516,6 +516,8 @@ static void opQuery(Globals & globals, enum { sInstalled, sAvailable } source = sInstalled; + readOnlyMode = true; /* makes evaluation a bit faster */ + for (Strings::iterator i = opFlags.begin(); i != opFlags.end(); ++i) if (*i == "--status" || *i == "-s") printStatus = true;