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

Only setup CMT if we have a contrib dir, and get the abspath of the installation dir

Fixes LBCORE-1270

See merge request !134
parents 1ae98d7f fd69232f
No related branches found
No related tags found
No related merge requests found
......@@ -385,7 +385,7 @@ class LbLoginScript(SourceScript):
log.debug("CMTSITE set to LOCAL. Guessing MYSITEROOT")
thismysiteroot = None
log.debug("IA dir: %s" % _ia_dir)
thisprojectversdir = os.path.dirname(_ia_dir)
thisprojectversdir = os.path.dirname(os.path.abspath(_ia_dir))
log.debug("proj vers dir: %s" % thisprojectversdir)
if os.path.isdir(thisprojectversdir) :
thisprojectdir = os.path.dirname(thisprojectversdir)
......@@ -554,13 +554,14 @@ class LbLoginScript(SourceScript):
if ev.has_key("CONTRIBDIR") :
ev["CMT_DIR"] = ev["CONTRIBDIR"]
ev["CMTROOT"] = multiPathGetFirst(ev["CMT_DIR"], os.path.join("CMT", opts.cmtvers))
if not os.path.isdir(ev["CMTROOT"]) :
log.error("Directory %s doesn't exist" % ev["CMTROOT"])
ev["CMTROOT"] = self._currentcmtroot
ev["CMTVERS"] = opts.cmtvers
log.debug("The CMT version is %s" % opts.cmtvers)
self.setCMTInternals()
if not os.path.isdir(ev["CMTROOT"]) :
log.error("Directory %s doesn't exist" % ev["CMTROOT"])
ev["CMTROOT"] = self._currentcmtroot
ev["CMTVERS"] = opts.cmtvers
log.debug("The CMT version is %s" % opts.cmtvers)
self.setCMTInternals()
def setCMake(self):
from os.path import join, pathsep, isdir
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment