about summary refs log tree commit diff
path: root/src/nix/nix.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-11-18T11·22+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-11-18T11·22+0000
commitce92d1bf1434562f5b80320c503768c4d06f1f8d (patch)
tree477c80de94f3c403115f80bad450003946af2889 /src/nix/nix.cc
parent9f0f020929c9e093405cc6193d2f227cab763912 (diff)
* "Nix expression" -> "store expression".
* More refactoring.

Diffstat (limited to 'src/nix/nix.cc')
-rw-r--r--src/nix/nix.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nix/nix.cc b/src/nix/nix.cc
index 1875689990a4..d1766de39b7e 100644
--- a/src/nix/nix.cc
+++ b/src/nix/nix.cc
@@ -27,15 +27,15 @@ static Path checkPath(const Path & arg)
 }
 
 
-/* Realise (or install) paths from the given Nix expressions. */
-static void opInstall(Strings opFlags, Strings opArgs)
+/* Realise paths from the given store expressions. */
+static void opRealise(Strings opFlags, Strings opArgs)
 {
     if (!opFlags.empty()) throw UsageError("unknown flag");
 
     for (Strings::iterator i = opArgs.begin();
          i != opArgs.end(); i++)
     {
-        Path nfPath = normaliseNixExpr(checkPath(*i));
+        Path nfPath = normaliseStoreExpr(checkPath(*i));
         realiseClosure(nfPath);
         cout << format("%1%\n") % (string) nfPath;
     }
@@ -66,7 +66,7 @@ static void opAdd(Strings opFlags, Strings opArgs)
 
 Path maybeNormalise(const Path & ne, bool normalise)
 {
-    return normalise ? normaliseNixExpr(ne) : ne;
+    return normalise ? normaliseStoreExpr(ne) : ne;
 }
 
 
@@ -82,7 +82,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
     for (Strings::iterator i = opFlags.begin();
          i != opFlags.end(); i++)
         if (*i == "--list" || *i == "-l") query = qList;
-        else if (*i == "--requisites" || *i == "-r") query = qRequisites;
+        else if (*i == "--requisites" || *i == "-R") query = qRequisites;
         else if (*i == "--predecessors") query = qPredecessors;
         else if (*i == "--graph") query = qGraph;
         else if (*i == "--normalise" || *i == "-n") normalise = true;
@@ -96,7 +96,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
             for (Strings::iterator i = opArgs.begin();
                  i != opArgs.end(); i++)
             {
-                StringSet paths = nixExprRoots(
+                StringSet paths = storeExprRoots(
                     maybeNormalise(checkPath(*i), normalise));
                 for (StringSet::iterator j = paths.begin(); 
                      j != paths.end(); j++)
@@ -110,7 +110,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
             for (Strings::iterator i = opArgs.begin();
                  i != opArgs.end(); i++)
             {
-                StringSet paths2 = nixExprRequisites(
+                StringSet paths2 = storeExprRequisites(
                     maybeNormalise(checkPath(*i), normalise),
                     includeExprs, includeSuccessors);
                 paths.insert(paths2.begin(), paths2.end());
@@ -258,8 +258,8 @@ void run(Strings args)
 
         Operation oldOp = op;
 
-        if (arg == "--install" || arg == "-i")
-            op = opInstall;
+        if (arg == "--realise" || arg == "-r")
+            op = opRealise;
         else if (arg == "--delete" || arg == "-d")
             op = opDelete;
         else if (arg == "--add" || arg == "-A")