1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-26 04:00:59 +01:00
This commit is contained in:
Wouter den Breejen 2007-09-11 16:22:07 +00:00
parent ed55982085
commit e80c7bda4c
4 changed files with 28 additions and 18 deletions

View file

@ -138,6 +138,11 @@ static void initAndRun(int argc, char * * argv)
while (argc--) args.push_back(*argv++); while (argc--) args.push_back(*argv++);
args.erase(args.begin()); args.erase(args.begin());
/* We dont expand for nix-state since we need to pass arguments to other
* programs that can decide for themselves if they want expansion or not
*/
if(programId != "nix-state")
{
/* Expand compound dash options (i.e., `-qlf' -> `-q -l -f'), and /* Expand compound dash options (i.e., `-qlf' -> `-q -l -f'), and
ignore options for the ATerm library. */ ignore options for the ATerm library. */
for (Strings::iterator i = args.begin(); i != args.end(); ++i) { for (Strings::iterator i = args.begin(); i != args.end(); ++i) {
@ -155,6 +160,7 @@ static void initAndRun(int argc, char * * argv)
} }
args = remaining; args = remaining;
remaining.clear(); remaining.clear();
}
/* Process default options. */ /* Process default options. */
for (Strings::iterator i = args.begin(); i != args.end(); ++i) { for (Strings::iterator i = args.begin(); i != args.end(); ++i) {

View file

@ -1915,6 +1915,7 @@ void DerivationGoal::deleteTmpDir(bool force)
} }
else else
deletePathWrapped(tmpDir); deletePathWrapped(tmpDir);
tmpDir = ""; tmpDir = "";
} }
} }

View file

@ -650,6 +650,7 @@ static void installDerivations(Globals & globals,
externalState_p.erase(externalState_p.length(),1); externalState_p.erase(externalState_p.length(),1);
externalState_p = externalState_p.substr(0,externalState_p.find_last_of('/')); externalState_p = externalState_p.substr(0,externalState_p.find_last_of('/'));
ensureDirExists(externalState_p); ensureDirExists(externalState_p);
//printMsg(lvlError, format("EnsureDir: '%1%'") % externalState_p);
} }
//Now we create a symlink externalState --> statePath //Now we create a symlink externalState --> statePath

View file

@ -594,8 +594,10 @@ void run(Strings args)
username = arg.substr(7,arg.length()); username = arg.substr(7,arg.length());
else else{
opArgs.push_back(arg); opArgs.push_back(arg);
//printMsg(lvlInfo, format("ARG: %1%") % arg);
}
//in the startscript u can have --run, but could do showrevisions //in the startscript u can have --run, but could do showrevisions
if (oldOp && oldOp != op && oldOp != opRunComponent) if (oldOp && oldOp != op && oldOp != opRunComponent)