mirror of https://github.com/BOINC/boinc.git
- update_versions: if file is already in download dir,
and is the same, don't copy (it might not be writeable) - client: change "result" to "task" in user-visible messages svn path=/trunk/boinc/; revision=20785
This commit is contained in:
parent
a8ed958cd6
commit
c0ad0f3745
|
@ -1602,3 +1602,13 @@ David 3 Mar 2010
|
||||||
gui_rpc_client_print.cpp
|
gui_rpc_client_print.cpp
|
||||||
client/
|
client/
|
||||||
boinc_cmd.cpp
|
boinc_cmd.cpp
|
||||||
|
|
||||||
|
David 3 Mar 2010
|
||||||
|
- update_versions: if file is already in download dir,
|
||||||
|
and is the same, don't copy (it might not be writeable)
|
||||||
|
- client: change "result" to "task" in user-visible messages
|
||||||
|
|
||||||
|
py/Boinc/tools.py
|
||||||
|
client/
|
||||||
|
client_state.cpp
|
||||||
|
cs_scheduler.cpp
|
||||||
|
|
|
@ -1424,7 +1424,7 @@ int CLIENT_STATE::report_result_error(RESULT& res, const char* format, ...) {
|
||||||
vsnprintf(err_msg, sizeof(err_msg), format, va);
|
vsnprintf(err_msg, sizeof(err_msg), format, va);
|
||||||
va_end(va);
|
va_end(va);
|
||||||
|
|
||||||
sprintf(buf, "Unrecoverable error for result %s (%s)", res.name, err_msg);
|
sprintf(buf, "Unrecoverable error for task %s (%s)", res.name, err_msg);
|
||||||
scheduler_op->backoff(res.project, buf);
|
scheduler_op->backoff(res.project, buf);
|
||||||
|
|
||||||
sprintf( buf, "<message>\n%s\n</message>\n", err_msg);
|
sprintf( buf, "<message>\n%s\n</message>\n", err_msg);
|
||||||
|
|
|
@ -848,18 +848,18 @@ int CLIENT_STATE::handle_scheduler_reply(PROJECT* project, char* scheduler_url)
|
||||||
if (log_flags.sched_op_debug) {
|
if (log_flags.sched_op_debug) {
|
||||||
if (sr.results.size()) {
|
if (sr.results.size()) {
|
||||||
msg_printf(project, MSG_INFO,
|
msg_printf(project, MSG_INFO,
|
||||||
"[sched_op_debug] estimated total CPU job duration: %.0f seconds",
|
"[sched_op_debug] estimated total CPU task duration: %.0f seconds",
|
||||||
est_cpu_duration
|
est_cpu_duration
|
||||||
);
|
);
|
||||||
if (coproc_cuda) {
|
if (coproc_cuda) {
|
||||||
msg_printf(project, MSG_INFO,
|
msg_printf(project, MSG_INFO,
|
||||||
"[sched_op_debug] estimated total NVIDIA GPU job duration: %.0f seconds",
|
"[sched_op_debug] estimated total NVIDIA GPU task duration: %.0f seconds",
|
||||||
est_cuda_duration
|
est_cuda_duration
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (coproc_ati) {
|
if (coproc_ati) {
|
||||||
msg_printf(project, MSG_INFO,
|
msg_printf(project, MSG_INFO,
|
||||||
"[sched_op_debug] estimated total ATI GPU job duration: %.0f seconds",
|
"[sched_op_debug] estimated total ATI GPU task duration: %.0f seconds",
|
||||||
est_ati_duration
|
est_ati_duration
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -871,7 +871,7 @@ int CLIENT_STATE::handle_scheduler_reply(PROJECT* project, char* scheduler_url)
|
||||||
for (i=0; i<sr.result_acks.size(); i++) {
|
for (i=0; i<sr.result_acks.size(); i++) {
|
||||||
if (log_flags.sched_op_debug) {
|
if (log_flags.sched_op_debug) {
|
||||||
msg_printf(project, MSG_INFO,
|
msg_printf(project, MSG_INFO,
|
||||||
"[sched_op_debug] handle_scheduler_reply(): got ack for result %s\n",
|
"[sched_op_debug] handle_scheduler_reply(): got ack for task %s\n",
|
||||||
sr.result_acks[i].name
|
sr.result_acks[i].name
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,15 @@ except:
|
||||||
import os, shutil, binascii, filecmp
|
import os, shutil, binascii, filecmp
|
||||||
|
|
||||||
def check_immutable(src, dst):
|
def check_immutable(src, dst):
|
||||||
|
"""If dst exists and is the same as src, return false
|
||||||
|
If dst exists and differs from src, throw an exception
|
||||||
|
If dst doesn't exist, return true
|
||||||
|
"""
|
||||||
if not os.path.exists(dst):
|
if not os.path.exists(dst):
|
||||||
return
|
return True
|
||||||
if filecmp.cmp(src, dst) == 0:
|
if filecmp.cmp(src, dst) == 0:
|
||||||
raise SystemExit("\nERROR: file "+src+" is different from existing file "+dst+".\nBOINC files are immutable; you must use different names for different files")
|
raise SystemExit("\nERROR: file "+src+" is different from existing file "+dst+".\nBOINC files are immutable; you must use different names for different files")
|
||||||
|
return False
|
||||||
|
|
||||||
# from http://www.plope.com/software/uuidgen/view
|
# from http://www.plope.com/software/uuidgen/view
|
||||||
_urandomfd = None
|
_urandomfd = None
|
||||||
|
@ -119,8 +124,8 @@ def process_app_file(file, signature_text=None, quiet=False, executable=True):
|
||||||
target_url = os.path.join(config.config.download_url, target_file_base)
|
target_url = os.path.join(config.config.download_url, target_file_base)
|
||||||
if not quiet:
|
if not quiet:
|
||||||
print "Copying %s to %s"%(source_file_base, target_path)
|
print "Copying %s to %s"%(source_file_base, target_path)
|
||||||
check_immutable(file, target_path)
|
if check_immutable(file, target_path):
|
||||||
shutil.copy(file, target_path)
|
shutil.copy(file, target_path)
|
||||||
|
|
||||||
xml = '''<file_info>
|
xml = '''<file_info>
|
||||||
<name>%s</name>
|
<name>%s</name>
|
||||||
|
|
Loading…
Reference in New Issue