Yocto 2.3

Move OpenBMC to Yocto 2.3(pyro).

Tested: Built and verified Witherspoon and Palmetto images
Change-Id: I50744030e771f4850afc2a93a10d3507e76d36bc
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Resolves: openbmc/openbmc#2461
diff --git a/import-layers/yocto-poky/meta/classes/terminal.bbclass b/import-layers/yocto-poky/meta/classes/terminal.bbclass
index a94f755..a27e10c 100644
--- a/import-layers/yocto-poky/meta/classes/terminal.bbclass
+++ b/import-layers/yocto-poky/meta/classes/terminal.bbclass
@@ -3,7 +3,7 @@
 OE_TERMINAL[choices] = 'auto none \
                         ${@oe_terminal_prioritized()}'
 
-OE_TERMINAL_EXPORTS += 'EXTRA_OEMAKE'
+OE_TERMINAL_EXPORTS += 'EXTRA_OEMAKE CACHED_CONFIGUREVARS CONFIGUREOPTS EXTRA_OECONF'
 OE_TERMINAL_EXPORTS[type] = 'list'
 
 XAUTHORITY ?= "${HOME}/.Xauthority"
@@ -19,9 +19,9 @@
     envdata.setVar(cmd_func, 'exec ' + command)
     envdata.setVarFlag(cmd_func, 'func', '1')
 
-    runfmt = d.getVar('BB_RUNFMT', True) or "run.{func}.{pid}"
+    runfmt = d.getVar('BB_RUNFMT') or "run.{func}.{pid}"
     runfile = runfmt.format(func=cmd_func, task=cmd_func, taskfunc=cmd_func, pid=os.getpid())
-    runfile = os.path.join(d.getVar('T', True), runfile)
+    runfile = os.path.join(d.getVar('T'), runfile)
     bb.utils.mkdirhier(os.path.dirname(runfile))
 
     with open(runfile, 'w') as script:
@@ -44,7 +44,7 @@
         envdata.setVarFlag(v, 'export', '1')
 
     for export in oe.data.typed_value('OE_TERMINAL_EXPORTS', d):
-        value = d.getVar(export, True)
+        value = d.getVar(export)
         if value is not None:
             os.environ[export] = str(value)
             envdata.setVar(export, str(value))
@@ -60,12 +60,17 @@
     for key in origbbenv:
         if key in envdata:
             continue
-        value = origbbenv.getVar(key, True)
+        value = origbbenv.getVar(key)
         if value is not None:
             os.environ[key] = str(value)
             envdata.setVar(key, str(value))
             envdata.setVarFlag(key, 'export', '1')
 
+    # Use original PATH as a fallback
+    path = d.getVar('PATH') + ":" + origbbenv.getVar('PATH')
+    os.environ['PATH'] = path
+    envdata.setVar('PATH', path)
+
     # A complex PS1 might need more escaping of chars.
     # Lets not export PS1 instead.
     envdata.delVar("PS1")
@@ -88,8 +93,12 @@
 
     try:
         oe.terminal.spawn_preferred(command, title, None, d)
-    except oe.terminal.NoSupportedTerminals:
-        bb.fatal('No valid terminal found, unable to open devshell')
+    except oe.terminal.NoSupportedTerminals as nosup:
+        nosup.terms.remove("false")
+        cmds = '\n\t'.join(nosup.terms).replace("{command}",
+                    "do_terminal").replace("{title}", title)
+        bb.fatal('No valid terminal found, unable to open devshell.\n' +
+                'Tried the following commands:\n\t%s' % cmds)
     except oe.terminal.ExecutionError as exc:
         bb.fatal('Unable to spawn terminal %s: %s' % (terminal, exc))