summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-08-18 17:28:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-19 18:05:52 +0100
commit99730d64d4b83ce37d4b3f5a7f992512fd12cbf7 (patch)
treee25464c8651e14cffc5db34a7a70a68994abbae0 /bitbake/lib
parent3a1af0717782896051cf376b04b221653207ed19 (diff)
downloadpoky-99730d64d4b83ce37d4b3f5a7f992512fd12cbf7.tar.gz
bitbake: toaster: checksettings: fix TEMPLATECONF detection
Improving the TEMPLATECONF detection by verifying the return code and dumping extra debug information in case of exception. (Bitbake rev: bdc00755993aa37e7669c3859ef4ea9b1fc3e680) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py b/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
index 2978db23aa..83b4f28c86 100644
--- a/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
+++ b/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
@@ -166,7 +166,12 @@ class Command(NoArgsCommand):
166 for dirname in self._recursive_list_directories(be.sourcedir,2): 166 for dirname in self._recursive_list_directories(be.sourcedir,2):
167 if os.path.exists(os.path.join(dirname, ".templateconf")): 167 if os.path.exists(os.path.join(dirname, ".templateconf")):
168 import subprocess 168 import subprocess
169 conffilepath, error = subprocess.Popen('bash -c ". '+os.path.join(dirname, ".templateconf")+'; echo \"\$TEMPLATECONF\""', shell=True, stdout=subprocess.PIPE).communicate() 169 proc = subprocess.Popen('bash -c ". '+os.path.join(dirname, ".templateconf")+'; echo \"\$TEMPLATECONF\""', shell=True, stdout=subprocess.PIPE)
170 conffilepath, stderroroutput = proc.communicate()
171 proc.wait()
172 if proc.returncode != 0:
173 raise Exception("Failed to source TEMPLATECONF: %s" % stderroroutput)
174
170 conffilepath = os.path.join(conffilepath.strip(), "toasterconf.json") 175 conffilepath = os.path.join(conffilepath.strip(), "toasterconf.json")
171 candidatefilepath = os.path.join(dirname, conffilepath) 176 candidatefilepath = os.path.join(dirname, conffilepath)
172 if "toaster_cloned" in candidatefilepath: 177 if "toaster_cloned" in candidatefilepath:
@@ -195,6 +200,7 @@ class Command(NoArgsCommand):
195 return is_changed 200 return is_changed
196 except Exception as e: 201 except Exception as e:
197 print "Failure while trying to import the toaster config file: %s" % e 202 print "Failure while trying to import the toaster config file: %s" % e
203 traceback.print_exc(e)
198 else: 204 else:
199 print "\n Toaster could not find a configuration file. You need to configure Toaster manually using the web interface, or create a configuration file and use\n bitbake/lib/toaster/managepy.py loadconf [filename]\n command to load it. You can use https://wiki.yoctoproject.org/wiki/File:Toasterconf.json.txt.patch as a starting point." 205 print "\n Toaster could not find a configuration file. You need to configure Toaster manually using the web interface, or create a configuration file and use\n bitbake/lib/toaster/managepy.py loadconf [filename]\n command to load it. You can use https://wiki.yoctoproject.org/wiki/File:Toasterconf.json.txt.patch as a starting point."
200 206