Skip to content
Snippets Groups Projects

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

Merged Ben Couturier requested to merge LBCORE-1454 into master
1 file
+ 0
41
Compare changes
  • Side-by-side
  • Inline
@@ -959,42 +959,6 @@ def updateLHCbProjectPath(mysiteroot):
@@ -959,42 +959,6 @@ def updateLHCbProjectPath(mysiteroot):
finalcmtlist.append(d)
finalcmtlist.append(d)
os.environ["LHCBPROJECTPATH"] = os.pathsep.join(finalcmtlist)
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__':
if __name__ == '__main__':
targetlocation = None
targetlocation = None
@@ -1066,11 +1030,6 @@ if __name__ == '__main__':
@@ -1066,11 +1030,6 @@ if __name__ == '__main__':
opts.withoutpython, opts.withoutcache,
opts.withoutpython, opts.withoutcache,
opts.withoutgroupwrapper, opts.withoutmainwrapper)
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))
thelog.info(" End of generateLogin ".center(120))
Loading