From c702dfca3f5a437866faf190ce7b0869fd1058cb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 8 Apr 2005 13:48:41 +0000 Subject: [PATCH] * nix-store: `--substitute' -> `--register-substitutes'. --- scripts/nix-pull.in | 2 +- src/nix-store/help.txt | 2 +- src/nix-store/main.cc | 6 +++--- tests/fallback.sh | 2 +- tests/substitutes.sh | 2 +- tests/substitutes2.sh | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in index efd0c074f..e5c9cac53 100644 --- a/scripts/nix-pull.in +++ b/scripts/nix-pull.in @@ -74,7 +74,7 @@ print "$size store paths in manifest\n"; # Register all substitutes. print STDERR "registering substitutes...\n"; -my $pid = open2(\*READ, \*WRITE, "$binDir/nix-store --substitute") +my $pid = open2(\*READ, \*WRITE, "$binDir/nix-store --register-substitutes") or die "cannot run nix-store"; close READ; diff --git a/src/nix-store/help.txt b/src/nix-store/help.txt index 30f94a051..643c6bff5 100644 --- a/src/nix-store/help.txt +++ b/src/nix-store/help.txt @@ -9,7 +9,7 @@ Operations: --add / -A: copy a path to the Nix store --query / -q: query information - --substitute: register a substitute expression (dangerous!) + --register-substitutes: register a substitute expression (dangerous!) --clear-substitutes: clear all substitutes --register-validity: register path validity (dangerous!) --check-validity: check path validity diff --git a/src/nix-store/main.cc b/src/nix-store/main.cc index 496924677..87fbe58b1 100644 --- a/src/nix-store/main.cc +++ b/src/nix-store/main.cc @@ -394,7 +394,7 @@ static void opQuery(Strings opFlags, Strings opArgs) } -static void opSubstitute(Strings opFlags, Strings opArgs) +static void opRegisterSubstitutes(Strings opFlags, Strings opArgs) { if (!opFlags.empty()) throw UsageError("unknown flag"); if (!opArgs.empty()) throw UsageError("no arguments expected"); @@ -607,8 +607,8 @@ void run(Strings args) op = opPrintFixedPath; else if (arg == "--query" || arg == "-q") op = opQuery; - else if (arg == "--substitute") - op = opSubstitute; + else if (arg == "--register-substitutes") + op = opRegisterSubstitutes; else if (arg == "--clear-substitutes") op = opClearSubstitutes; else if (arg == "--register-validity") diff --git a/tests/fallback.sh b/tests/fallback.sh index 24e578410..4a3d29f39 100644 --- a/tests/fallback.sh +++ b/tests/fallback.sh @@ -5,7 +5,7 @@ outPath=$($TOP/src/nix-store/nix-store -q --fallback "$drvPath") echo "output path is $outPath" # Register a non-existant substitute -(echo $outPath && echo "" && echo $TOP/no-such-program && echo 0 && echo 0) | $TOP/src/nix-store/nix-store --substitute +(echo $outPath && echo "" && echo $TOP/no-such-program && echo 0 && echo 0) | $TOP/src/nix-store/nix-store --register-substitutes # Build the derivation $TOP/src/nix-store/nix-store -r --fallback "$drvPath" diff --git a/tests/substitutes.sh b/tests/substitutes.sh index cfc3fa71a..150d6b8a3 100644 --- a/tests/substitutes.sh +++ b/tests/substitutes.sh @@ -7,7 +7,7 @@ outPath=$($TOP/src/nix-store/nix-store -qvv "$drvPath") echo "output path is $outPath" regSub() { - (echo $1 && echo "" && echo $2 && echo 3 && echo $outPath && echo Hallo && echo Wereld && echo 0) | $TOP/src/nix-store/nix-store --substitute + (echo $1 && echo "" && echo $2 && echo 3 && echo $outPath && echo Hallo && echo Wereld && echo 0) | $TOP/src/nix-store/nix-store --register-substitutes } # Register a substitute for the output path. diff --git a/tests/substitutes2.sh b/tests/substitutes2.sh index 1a7b848ca..6dcff6fd4 100644 --- a/tests/substitutes2.sh +++ b/tests/substitutes2.sh @@ -7,7 +7,7 @@ outPath=$($TOP/src/nix-store/nix-store -qvvvvv "$drvPath") echo "output path is $outPath" regSub() { - (echo $1 && echo "" && echo $2 && echo 3 && echo $outPath && echo Hallo && echo Wereld && echo 0) | $TOP/src/nix-store/nix-store --substitute + (echo $1 && echo "" && echo $2 && echo 3 && echo $outPath && echo Hallo && echo Wereld && echo 0) | $TOP/src/nix-store/nix-store --register-substitutes } # Register a substitute for the output path.