mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=5228
This commit is contained in:
parent
24a1bb1abf
commit
e1c65eb341
|
@ -23312,11 +23312,19 @@ Rom 27 Jan 2005
|
||||||
|
|
||||||
David 27 Jan 2005
|
David 27 Jan 2005
|
||||||
- Enhancements to update_versions
|
- Enhancements to update_versions
|
||||||
|
- allow a multi-file app version to include multiple executable files
|
||||||
|
All files with the u+x bit set are treated as executable
|
||||||
- set min_core_version and max_core_version to zero.
|
- set min_core_version and max_core_version to zero.
|
||||||
Shouldn't be setting these here.
|
Shouldn't be setting these to anything nonzero here.
|
||||||
Projects are no longer expected to maintain core versions.
|
Projects are no longer expected to maintain core versions.
|
||||||
|
|
||||||
py/Boinc/
|
py/Boinc/
|
||||||
tools.py
|
tools.py
|
||||||
tools/
|
tools/
|
||||||
update_versions
|
update_versions
|
||||||
|
|
||||||
|
David 27 Jan 2005
|
||||||
|
- scheduler reply includes scheduler's version info
|
||||||
|
|
||||||
|
sched/
|
||||||
|
server_types.C
|
||||||
|
|
|
@ -206,6 +206,8 @@ int SCHEDULER_REPLY::write(FILE* fout) {
|
||||||
|
|
||||||
fprintf(fout,
|
fprintf(fout,
|
||||||
"<scheduler_reply>\n"
|
"<scheduler_reply>\n"
|
||||||
|
<scheduler_version>%d</scheduler_version>\n",
|
||||||
|
BOINC_MAJOR_VERSION*100+BOINC_MINOR_VERSION
|
||||||
);
|
);
|
||||||
|
|
||||||
if (request_delay) {
|
if (request_delay) {
|
||||||
|
|
|
@ -57,22 +57,21 @@ def xlistdir(dir):
|
||||||
return map(lambda file: os.path.join(dir, file), os.listdir(dir))
|
return map(lambda file: os.path.join(dir, file), os.listdir(dir))
|
||||||
|
|
||||||
def add_files(
|
def add_files(
|
||||||
app, match, exec_file, non_exec_files=[],
|
app,
|
||||||
signature_files={}, file_ref_infos = {}
|
match, # the output of re_match_exec_filename(exec_files[0])
|
||||||
|
exec_files, # executable files
|
||||||
|
non_exec_files=[], # non-executable files
|
||||||
|
signature_files={},
|
||||||
|
file_ref_infos = {}
|
||||||
):
|
):
|
||||||
''' add files to app/core.
|
''' add files to app/core.
|
||||||
|
|
||||||
EXEC_FILE is the executable, and NON_EXEC_FILES are supporting
|
|
||||||
non-executable files.
|
|
||||||
|
|
||||||
MATCH is the output of re_match_exec_filename(EXEC_FILE).
|
|
||||||
'''
|
'''
|
||||||
assert(match)
|
assert(match)
|
||||||
assert(exec_file)
|
assert(exec_files[0])
|
||||||
version_major, version_minor, platform_name = match.groups()
|
version_major, version_minor, platform_name = match.groups()
|
||||||
version_num = int(version_major) * 100 + int(version_minor)
|
version_num = int(version_major) * 100 + int(version_minor)
|
||||||
|
|
||||||
file_base = os.path.basename(exec_file)
|
file_base = os.path.basename(exec_files[0])
|
||||||
platforms = database.Platforms.find(name = platform_name)
|
platforms = database.Platforms.find(name = platform_name)
|
||||||
if not platforms:
|
if not platforms:
|
||||||
print >>sys.stderr, " Unknown platform '%s' for file %s" %(platform_name, file_base)
|
print >>sys.stderr, " Unknown platform '%s' for file %s" %(platform_name, file_base)
|
||||||
|
@ -95,7 +94,7 @@ def add_files(
|
||||||
xml_doc = tools.process_app_version(
|
xml_doc = tools.process_app_version(
|
||||||
app = app,
|
app = app,
|
||||||
version_num = version_num,
|
version_num = version_num,
|
||||||
exec_files = [exec_file],
|
exec_files = exec_files,
|
||||||
non_exec_files = non_exec_files,
|
non_exec_files = non_exec_files,
|
||||||
signature_files = signature_files,
|
signature_files = signature_files,
|
||||||
file_ref_infos = file_ref_infos
|
file_ref_infos = file_ref_infos
|
||||||
|
@ -117,7 +116,7 @@ def add_files(
|
||||||
|
|
||||||
print " Found core version %3d for %s: %s" %(version_num, platform, file_base)
|
print " Found core version %3d for %s: %s" %(version_num, platform, file_base)
|
||||||
|
|
||||||
xml_doc = tools.process_executable_file(exec_file)
|
xml_doc = tools.process_app_file(exec_files[0])
|
||||||
|
|
||||||
object = database.CoreVersion(
|
object = database.CoreVersion(
|
||||||
create_time = create_time,
|
create_time = create_time,
|
||||||
|
@ -165,13 +164,15 @@ def find_versions(app, dir):
|
||||||
else:
|
else:
|
||||||
find_versions__process_single_file(app, match, filepath)
|
find_versions__process_single_file(app, match, filepath)
|
||||||
|
|
||||||
# Process an app that is a single file only, possibly with
|
# Process an app that is a single file only,
|
||||||
# a signature file included. Could also be the core client.
|
# possibly with a signature file included.
|
||||||
|
# Could also be the core client.
|
||||||
#
|
#
|
||||||
def find_versions__process_single_file(app, match, filepath):
|
def find_versions__process_single_file(app, match, filepath):
|
||||||
'''add a single executable as app/core version'''
|
'''add a single executable as app/core version'''
|
||||||
# Find signature file, if it exists.
|
# Find signature file, if it exists.
|
||||||
signature_files={}
|
signature_files={}
|
||||||
|
exec_files={}
|
||||||
sig_file = filepath + ".sig"
|
sig_file = filepath + ".sig"
|
||||||
if os.path.isfile(sig_file):
|
if os.path.isfile(sig_file):
|
||||||
signature_files[filepath] = sig_file
|
signature_files[filepath] = sig_file
|
||||||
|
@ -179,7 +180,7 @@ def find_versions__process_single_file(app, match, filepath):
|
||||||
add_files(
|
add_files(
|
||||||
app = app,
|
app = app,
|
||||||
match = match,
|
match = match,
|
||||||
exec_file = filepath,
|
exec_files = filepath,
|
||||||
signature_files = signature_files,
|
signature_files = signature_files,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -189,7 +190,7 @@ def find_versions__process_single_file(app, match, filepath):
|
||||||
|
|
||||||
def find_versions__process_bundle(app, match, dir):
|
def find_versions__process_bundle(app, match, dir):
|
||||||
'''add executable + bundle as app/core version'''
|
'''add executable + bundle as app/core version'''
|
||||||
exec_file = None
|
exec_files = []
|
||||||
non_exec_files = []
|
non_exec_files = []
|
||||||
signature_files = {}
|
signature_files = {}
|
||||||
file_ref_infos = {}
|
file_ref_infos = {}
|
||||||
|
@ -200,7 +201,7 @@ def find_versions__process_bundle(app, match, dir):
|
||||||
if os.path.basename(filepath) == dirname:
|
if os.path.basename(filepath) == dirname:
|
||||||
# the filename matches the folder name,
|
# the filename matches the folder name,
|
||||||
# so this is the main program executable.
|
# so this is the main program executable.
|
||||||
exec_file = filepath
|
exec_files.insert(0, filepath)
|
||||||
continue
|
continue
|
||||||
# if filename is of format 'EXECFILE.sig' treat it as signature file
|
# if filename is of format 'EXECFILE.sig' treat it as signature file
|
||||||
if filepath.endswith('.sig'):
|
if filepath.endswith('.sig'):
|
||||||
|
@ -211,23 +212,27 @@ def find_versions__process_bundle(app, match, dir):
|
||||||
s = filepath[:-len('.file_ref_info')]
|
s = filepath[:-len('.file_ref_info')]
|
||||||
file_ref_infos[s] = open(filepath).read()
|
file_ref_infos[s] = open(filepath).read()
|
||||||
continue
|
continue
|
||||||
|
if os.access(filepath, os.X_OK):
|
||||||
|
exec_files.append(filepath)
|
||||||
|
continue;
|
||||||
non_exec_files.append(filepath)
|
non_exec_files.append(filepath)
|
||||||
if not exec_file:
|
if not exec_files:
|
||||||
print >>sys.stderr, " Ignoring directory (no executable found - it has to be named the same as the directory)", dir
|
print >>sys.stderr, " Ignoring directory (no executable found - it has to be named the same as the directory)", dir
|
||||||
return
|
return
|
||||||
|
|
||||||
# check signatures, file_path_infos
|
# check signatures, file_path_infos
|
||||||
for filepath, signature_file in signature_files.items():
|
for filepath, signature_file in signature_files.items():
|
||||||
if filepath != exec_file and filepath not in non_exec_files:
|
if filepath not in exec_files and filepath not in non_exec_files:
|
||||||
print >>sys.stderr, " Warning: signature file '%s' will be ignored because it does not match an executable file" %signature_file
|
print >>sys.stderr, " Warning: signature file '%s' will be ignored because it does not match a file" %signature_file
|
||||||
for filepath in file_ref_infos:
|
for filepath in file_ref_infos:
|
||||||
file_ref_info_filepath = filepath+'.file_ref_info'
|
file_ref_info_filepath = filepath+'.file_ref_info'
|
||||||
if filepath != exec_file and filepath not in non_exec_files:
|
if filepath not in exec_files and filepath not in non_exec_files:
|
||||||
print >>sys.stderr, " Warning: file_ref info file '%s' will be ignored because it does not match a file" %file_ref_info_filepath
|
print >>sys.stderr, " Warning: file_ref info file '%s' will be ignored because it does not match a file" %file_ref_info_filepath
|
||||||
|
|
||||||
add_files(
|
add_files(
|
||||||
app = app,
|
app = app,
|
||||||
match = match,
|
match = match,
|
||||||
exec_file = exec_file,
|
exec_files = exec_files,
|
||||||
non_exec_files = non_exec_files,
|
non_exec_files = non_exec_files,
|
||||||
signature_files = signature_files,
|
signature_files = signature_files,
|
||||||
file_ref_infos = file_ref_infos,
|
file_ref_infos = file_ref_infos,
|
||||||
|
|
Loading…
Reference in New Issue