1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-27 04:30:59 +01:00

Fixed remote issues

This commit is contained in:
Wouter den Breejen 2007-09-05 14:13:50 +00:00
parent 35e239af33
commit ed55982085
11 changed files with 57 additions and 56 deletions

View file

@ -383,14 +383,12 @@ void Database::setString(const Transaction & txn, TableId table,
const string & key, const string & data)
{
checkInterrupt();
printMsg(lvlError, format("SS: '%1%'") % data);
try {
Db * db = getDb(table);
Dbt kt((void *) key.c_str(), key.length());
Dbt dt((void *) data.c_str(), data.length());
db->put(txn.txn, &kt, &dt, 0);
} catch (DbException e) { rethrow(e); }
printMsg(lvlError, format("SETTEDS"));
}

View file

@ -29,7 +29,9 @@ string thisSystem = "unset";
unsigned int maxSilentTime = 0;
static bool settingsRead = false;
uid_t callingUID = 0; //A root user will not set this value, so the default uid is 0
bool debugWorker = false; //TODO Still experimental ! this gives an store already open at the second call
bool singleThreaded = false; //TODO Gives an error: cannot start worker (environment already open) / waiting for process 7487: No child processes
bool sendOutput = true;
static std::map<string, Strings> settings;

View file

@ -96,7 +96,9 @@ string queryCallingUsername();
/* get the username based on the UID of the user currently runs the process */
string queryCurrentUsername();
extern bool debugWorker;
extern bool singleThreaded;
extern bool sendOutput;
}

View file

@ -694,7 +694,7 @@ void setDeriver(const Transaction & txn, const Path & storePath, const Path & de
* into account. This function is used to update derivations that have only changed in their sub state
* paths that need to be versioned for example. We assume newdrv is the newest.
*/
PathSet mergeNewDerivationIntoListTxn(const Transaction txn, const Path & storepath, const Path & newdrv, const PathSet drvs, bool deleteDrvs)
PathSet mergeNewDerivationIntoListTxn(const Transaction & txn, const Path & storepath, const Path & newdrv, const PathSet drvs, bool deleteDrvs)
{
PathSet newdrvs;
@ -744,11 +744,8 @@ void addStateDeriver(const Transaction & txn, const Path & storePath, const Path
for (PathSet::iterator i = updatedDerivers.begin(); i != updatedDerivers.end(); ++i) //Convert Paths to Strings
data.push_back(*i);
for (Strings::iterator i = data.begin(); i != data.end(); ++i)
printMsg(lvlError, format("AA: %1%") % *i);
nixDB.setStrings(txn, dbDerivers, storePath, data); //update the derivers db.
printMsg(lvlError, format("%BB"));
nixDB.setString(txn, dbStateInfo, storePath, ""); //update the dbinfo db. (maybe TODO)
}

View file

@ -40,7 +40,7 @@ void createSubStateDirsTxn(const Transaction & txn, const DerivationStateOutputD
//TODO
/*
if( ! DirectoryExist( ....... ) ){
if( ! DirectoryExists( ....... ) ){
}
else
printMsg(lvlTalkative, format("Statedir %1% already exists, so dont ........ ???? ") % ...);