summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2012-04-10 17:57:15 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-11 17:58:51 +0100
commit9789ed626bc69f348b55cfa5f1a79abbdc994204 (patch)
tree68de5a3abcc87a1bbf0f9adb1e251258bc1d7b1c
parent4be09eec6a5a25da089d8ad4fb68d2fda8149912 (diff)
downloadpoky-9789ed626bc69f348b55cfa5f1a79abbdc994204.tar.gz
poky-9789ed626bc69f348b55cfa5f1a79abbdc994204.tar.bz2
poky-9789ed626bc69f348b55cfa5f1a79abbdc994204.zip
hig/builder: use the new which_terminal() function
Also adjusted the cmdline ordering to work correctly with both xterm and vte. (Bitbake rev: 4219e2ea033232d95117211947b751bdb5efafd4) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py11
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig.py8
2 files changed, 12 insertions, 7 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 95402e04ba..d8d09871cf 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -37,6 +37,7 @@ from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \
AdvancedSettingDialog, LayerSelectionDialog, \
DeployImageDialog
from bb.ui.crumbs.persistenttooltip import PersistentTooltip
+import bb.ui.crumbs.utils
class Configuration:
'''Represents the data structure of configuration.'''
@@ -969,12 +970,13 @@ class Builder(gtk.Window):
if response == gtk.RESPONSE_YES:
source_env_path = os.path.join(self.parameters.core_base, "oe-init-build-env")
tmp_path = self.parameters.tmpdir
+ cmdline = bb.ui.crumbs.utils.which_terminal()
if os.path.exists(image_path) and os.path.exists(kernel_path) \
- and os.path.exists(source_env_path) and os.path.exists(tmp_path):
- cmdline = "/usr/bin/xterm -e "
- cmdline += "\" export OE_TMPDIR=" + tmp_path + "; "
+ and os.path.exists(source_env_path) and os.path.exists(tmp_path)
+ and cmdline:
+ cmdline += "\' bash -c \"export OE_TMPDIR=" + tmp_path + "; "
cmdline += "source " + source_env_path + " " + os.getcwd() + "; "
- cmdline += "runqemu " + kernel_path + " " + image_path + "; bash\""
+ cmdline += "runqemu " + kernel_path + " " + image_path + "\"\'"
subprocess.Popen(shlex.split(cmdline))
else:
lbl = "<b>Path error</b>\nOne of your paths is wrong,"
@@ -983,6 +985,7 @@ class Builder(gtk.Window):
lbl = lbl + "kernel path:" + kernel_path + "\n"
lbl = lbl + "source environment path:" + source_env_path + "\n"
lbl = lbl + "tmp path: " + tmp_path + "."
+ lbl = lbl + "You may be missing either xterm or vte for terminal services."
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR)
button = dialog.add_button("Close", gtk.RESPONSE_OK)
HobButton.style_button(button)
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py
index 016fb59acb..5cc8a5931a 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -30,6 +30,7 @@ import shlex
from bb.ui.crumbs.hobcolor import HobColors
from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton, HobIconChecker
from bb.ui.crumbs.progressbar import HobProgressBar
+import bb.ui.crumbs.utils
"""
The following are convenience classes for implementing GNOME HIG compliant
@@ -739,9 +740,10 @@ class DeployImageDialog (CrumbsDialog):
if response_id == gtk.RESPONSE_YES:
combo_item = self.usb_combo.get_active_text()
if combo_item and combo_item != self.__dummy_usb__:
- cmdline = "/usr/bin/xterm -e "
- cmdline += "\"sudo dd if=" + self.image_path + " of=" + combo_item + "; bash\""
- subprocess.Popen(args=shlex.split(cmdline))
+ cmdline = bb.ui.crumbs.utils.which_terminal()
+ if cmdline:
+ cmdline += "\"sudo dd if=" + self.image_path + " of=" + combo_item + "\""
+ subprocess.Popen(args=shlex.split(cmdline))
def update_progress_bar(self, title, fraction, status=None):
self.progress_bar.update(fraction)