Skip to content
Snippets Groups Projects
Commit 5b2a9e43 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Merge branch 'LBCORE-1454' into 'master'

Do not generate un-needed xenv file when generating the login files

Closes LBCORE-1454

See merge request !225
parents 6db96aec b4820fb3
No related branches found
No related tags found
1 merge request!225Do not generate un-needed xenv file when generating the login files
......@@ -959,42 +959,6 @@ def updateLHCbProjectPath(mysiteroot):
finalcmtlist.append(d)
os.environ["LHCBPROJECTPATH"] = os.pathsep.join(finalcmtlist)
def generateEnvXML():
'''
Generate the Manifest.xml and xenv file for LbScripts
'''
# Checking the environment
log = logging.getLogger()
# Building the paths for the input and output files
jsonMetadataDir = os.path.join(_lbconf_dir , "cmt")
mxmlFullname = os.path.join(_prj_dir, "manifest.xml")
xenvFullname = os.path.join(_prj_dir, "LbScripts.xenv")
# Now import the code to generate the XML files
from LbUtils.LbRunConfigTools import prettify, loadConfig
from LbUtils.LbRunConfigTools import ManifestGenerator, XEnvGenerator
log.info("Loading projectConfig.json from %s" % jsonMetadataDir)
config = loadConfig(jsonMetadataDir)
config['cmtconfig'] = os.environ['CMTCONFIG']
# the manifest.xml
log.info("Generating %s" % mxmlFullname)
mg = ManifestGenerator(config)
manifest = mg.getDocument()
with open(mxmlFullname, "w") as f:
f.write(prettify(manifest))
# Now the xenv file
log.info("Generating %s" % xenvFullname)
xg = XEnvGenerator(config)
xe = xg.getDocument()
with open(xenvFullname, "w") as f:
f.write(prettify(xe))
return 0
if __name__ == '__main__':
targetlocation = None
......@@ -1066,11 +1030,6 @@ if __name__ == '__main__':
opts.withoutpython, opts.withoutcache,
opts.withoutgroupwrapper, opts.withoutmainwrapper)
try:
generateEnvXML()
except Exception, e:
print e
thelog.error("Problem generating the xenv and manifest files")
thelog.info(" End of generateLogin ".center(120))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment