[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/icecream/icecream/client
From: Stephan Kulow <coolo () kde ! org>
Date: 2004-09-06 9:45:17
Message-ID: 20040906094517.B8927E61 () office ! kde ! org
[Download RAW message or body]
CVS commit by coolo:
scons is a mean tool: it unsets all kind of environment variables including
$PATH, $HOME and $ICECC_VERSION - trying to cope with that
M +20 -14 main.cpp 1.44
M +3 -1 util.cpp 1.10
--- kdenonbeta/icecream/icecream/client/main.cpp #1.43:1.44
@@ -202,28 +202,34 @@ int main(int argc, char **argv)
if ( !local ) {
- if ( getenv( "ICECC_VERSION" ) ) // if set, use it, otherwise take default
+ if ( getenv( "ICECC_VERSION" ) ) { // if set, use it, otherwise take default
+ try {
envs = parse_icecc_version( job.targetPlatform() );
- else {
- string native = ucs->nativeVersion;
- if ( native.empty() ) {
- log_warning() << "$ICECC_VERSION has to point to an existing file to \
be installed - as the local daemon didn't know any we try local." << \
endl
- << "Hint: you need /usr/bin/gcc _and_ /usr/bin/g++." \
<< endl;
- delete ucs;
- delete local_daemon;
- return build_local( job );
+ } catch ( int x ) {
+ // we just build locally
}
+ } else {
+ string native = ucs->nativeVersion;
+ if ( native.empty() || ::access( native.c_str(), R_OK ) ) {
+ log_warning() << "$ICECC_VERSION has to point to an existing file to \
be installed - as the local daemon didn't know any we try local." << endl; + \
} else envs.push_back(make_pair( job.targetPlatform(), native ) );
}
}
+ bool error = ( envs.size() == 0 );
for ( Environments::const_iterator it = envs.begin(); it != envs.end(); ++it ) {
trace() << "env: " << it->first << " '" << it->second << "'" << endl;
if ( ::access( it->second.c_str(), R_OK ) ) {
log_error() << "can't read environment " << it->second << endl;
+ error = true;
+ break;
+ }
+ }
+
+ if ( error ) {
delete local_daemon;
delete ucs;
return local || build_local( job );
}
- }
trace() << "contacting scheduler " << ucs->hostname << ":" << ucs->port << endl;
--- kdenonbeta/icecream/icecream/client/util.cpp #1.9:1.10
@@ -157,5 +157,7 @@ static bool dcc_open_lockfile(const stri
bool dcc_lock_host(int &lock_fd)
{
- string fname = getenv( "HOME" );
+ string fname;
+ if ( getenv( "HOME" ) )
+ fname = getenv( "HOME" );
if ( !fname.size() )
fname = "/tmp";
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic