*** empty log message ***

svn path=/trunk/boinc/; revision=2570
This commit is contained in:
Karl Chen 2003-10-26 07:35:09 +00:00
parent a50e6a0c5e
commit e8a2bdfd61
1 changed files with 8 additions and 6 deletions

View File

@ -113,7 +113,8 @@ def add_files(app, match, exec_file, non_exec_files=[]):
objects_to_commit.append(object) objects_to_commit.append(object)
def re_match_exec_filename(file): def re_match_exec_filename(filepath):
file = os.path.basename(filepath)
return re.match('[^.]+_([0-9]+)[.]([0-9]+)_(.+?)(?:[.]gz|[.]exe|[.]sit)?$', file) return re.match('[^.]+_([0-9]+)[.]([0-9]+)_(.+?)(?:[.]gz|[.]exe|[.]sit)?$', file)
def find_versions(app, dir): def find_versions(app, dir):
@ -130,7 +131,8 @@ def find_versions(app, dir):
""" """
for filepath in xsort(glob.glob(os.path.join(dir, '*'))): for filepath in xsort(glob.glob(os.path.join(dir, '*'))):
file = os.path.basename(filepath) if os.path.islink(filepath):
continue
if os.path.isdir(filepath): if os.path.isdir(filepath):
# add executable + bundle as app/core version # add executable + bundle as app/core version
exec_file = None exec_file = None
@ -142,12 +144,12 @@ def find_versions(app, dir):
continue continue
if not match: if not match:
# no executable found yet, try this one # no executable found yet, try this one
match = re_match_exec_filename(file) match = re_match_exec_filename(filepath)
if match: if match:
# found an executable matching regexp # found an executable matching regexp
exec_file = file exec_file = filepath
continue continue
non_exec_files.append(file) non_exec_files.append(filepath)
if not match: if not match:
print >>sys.stderr, " Ignoring directory", dir print >>sys.stderr, " Ignoring directory", dir
continue continue
@ -156,7 +158,7 @@ def find_versions(app, dir):
non_exec_files=non_exec_files) non_exec_files=non_exec_files)
else: else:
# add a single executable as app/core version # add a single executable as app/core version
match = re_match_exec_filename(file) match = re_match_exec_filename(filepath)
if not match: if not match:
print >>sys.stderr, " Ignoring unknown file", filepath print >>sys.stderr, " Ignoring unknown file", filepath
continue continue