Skip to content
Snippets Groups Projects
Commit 23e4f1e5 authored by Aaron Webb's avatar Aaron Webb
Browse files

Change config script to read from cvmfs release directory rather than afs symlinks

Former-commit-id: 30aa5051424def3edbd3abaa3ace2450de58fb25
parent 8d6a8949
No related branches found
No related tags found
No related merge requests found
...@@ -5,15 +5,13 @@ ...@@ -5,15 +5,13 @@
# 10-Sep-2010, Peter Onyisi <ponyisi@cern.ch> # 10-Sep-2010, Peter Onyisi <ponyisi@cern.ch>
# #
# Script for uploading a new DQ configuration to AMI "h" tag # Script for uploading a new DQ configuration to AMI "h" tag
# ASSUMPTION: the binary DQ configurations are in AFS; they have the following # ASSUMPTION: the binary DQ configurations have the following
# directory structure: # directory structure:
# $BASEDIR / Cosmics / cosmics_minutes10.current.hcfg # $BASEDIR / cosmics_minutes10.hcfg
# / cosmics_minutes30.current.hcfg # / cosmics_minutes30.hcfg
# / cosmics_run.current.hcfg # / cosmics_run.hcfg
# / Collisions / collisions_*current.hcfg # / collisions_*.hcfg
# / HeavyIons / heavyions_*current.hcfg # / heavyions_*.hcfg
# and that the *.current.hcfg files are valid symlinks to files in the
# respective directories.
import sys, os import sys, os
...@@ -86,7 +84,7 @@ def update_dict_for_configs(updict, indir): ...@@ -86,7 +84,7 @@ def update_dict_for_configs(updict, indir):
print 'Looking for configurations in subdirectories of', indir print 'Looking for configurations in subdirectories of', indir
types = ['minutes10', 'minutes30', 'run'] types = ['minutes10', 'run']
searchparams = [('Cosmics', 'cosmics'), ('Collisions', 'collisions'), searchparams = [('Cosmics', 'cosmics'), ('Collisions', 'collisions'),
('HeavyIons', 'heavyions')] ('HeavyIons', 'heavyions')]
...@@ -98,19 +96,12 @@ def update_dict_for_configs(updict, indir): ...@@ -98,19 +96,12 @@ def update_dict_for_configs(updict, indir):
filepathdict[dir1] = {} filepathdict[dir1] = {}
for t in types: for t in types:
print ' ', t, '...', print ' ', t, '...',
fname = os.path.join(basedir, dir1, fname = os.path.join(basedir, '%s_%s.hcfg' % (fn, t))
'%s_%s.current.hcfg' % (fn, t))
if os.access(fname, os.R_OK): if os.access(fname, os.R_OK):
print 'found,', print 'found %s' % (dir1)
if os.path.islink(fname) and os.path.isfile(fname): if os.path.isfile(fname):
realname = os.readlink(fname) filepathdict[dir1][t] = fname
if not os.path.isabs(realname): filelist.append(fname)
realname = os.path.join(os.path.dirname(fname), realname)
print 'is symlink to', realname
filepathdict[dir1][t] = realname
filelist.append(realname)
else:
print 'but is not valid symlink'
else: else:
print 'not found' print 'not found'
if filepathdict[dir1] == {}: if filepathdict[dir1] == {}:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment