Bug 4439

Summary: devshell fails to open a new tmux session
Product: [Build System, Metadata & Runtime] BitBake Reporter: Diego <diego.ml>
Component: bitbakeAssignee: Christopher Larson <kergoth>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: bluelightning, eren, poky.bs.watcher, poky.watcher, sgw
Version: unspecified   
Target Milestone: 1.5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Output of "bitbake -c devshell package"
none
Devshell task log.
none
Fix wrong argument escaping none

Description Diego 2013-04-30 14:35:16 UTC
Created attachment 1204 [details]
Output of "bitbake -c devshell package"

$ bitbake --version
BitBake Build Tool Core version 1.18.0, bitbake version 1.18.0

If i try "bitbake -c devshell package" with tmux installed bitbake fails telling:
ERROR: Unable to spawn terminal auto: Execution of 'pseudo /bin/bash' failed with exit code 1:
usage: split-window [-dhvP] [-p percentage|-l size] [-t target-pane] [command]

This happens both when tmux is running (tmux_running case) and when tmux is not running (tmux case).

If I uninstall tmux bitbake -c devshell is able to open up correctly a screen session. I think something is wrong with parameters bitbake passes to shell, because tmux responds with usage instrucions.

Logs are attached.
Comment 1 Diego 2013-04-30 14:36:05 UTC
Created attachment 1205 [details]
Devshell task log.
Comment 2 Christopher Larson 2013-04-30 17:20:19 UTC
Ah, I expect this is a tmux version requirement I didn't notice, it's likely using an argument which isn't supported for old versions of tmux. Will take a look.
Comment 3 Eren Türkay 2013-07-11 12:48:17 UTC
I also get similar error when using "bitbake linux-yocto -c menuconfig". My tmux version is 1.6-1ubuntu1

ERROR: Unable to spawn terminal auto: Execution of '/bin/zsh -c "make menuconfig; if [ $? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi"' failed with exit code 1:

usage: split-window [-dhvP] [-p percentage|-l size] [-t target-pane] [command]

Build Configuration:
BB_VERSION        = "1.18.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-12.04"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.4.1"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta
meta-yocto
meta-yocto-bsp    = "dylan:e4a0a4c5e419154a34710a1b6c28d4180c6304c3"
meta-hamradio     = "master:b34b9115491d96570fb7801e85bc3c85b3b11d5e"
Comment 4 Tarteauxfraises 2013-07-11 22:15:16 UTC
Created attachment 1323 [details]
Fix wrong argument escaping

You should test this patch does'nt impact others terminals
Comment 5 Eren Türkay 2013-07-12 10:21:10 UTC
(In reply to comment #4)
> Created attachment 1323 [details]
> Fix wrong argument escaping
> 
> You should test this patch does'nt impact others terminals

It fixed the problem for kernel configuration after applying this patch to "dylan" release.

Thanks!
Comment 6 Paul Eggleton 2013-07-29 12:35:29 UTC
This issue should be fixed by http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=c9c70d624125dfa25461f7586b9bbd2bc7ff2372 - at least it fixed the problem here. Can anyone else confirm?
Comment 7 Diego 2013-07-29 14:05:19 UTC
(In reply to comment #6)
> This issue should be fixed by
> http://git.yoctoproject.org/cgit.cgi/poky/commit/
> ?id=c9c70d624125dfa25461f7586b9bbd2bc7ff2372 - at least it fixed the problem
> here. Can anyone else confirm?

Yeah, it works for me.
Comment 8 Eren Türkay 2013-07-30 13:53:07 UTC
(In reply to comment #6)
> This issue should be fixed by
> http://git.yoctoproject.org/cgit.cgi/poky/commit/
> ?id=c9c70d624125dfa25461f7586b9bbd2bc7ff2372 - at least it fixed the problem
> here. Can anyone else confirm?

Yes. I also confirm that this change fixed the problem in "dylan".
Comment 9 Paul Eggleton 2013-08-13 12:22:45 UTC
The following changes have been merged to dylan for 1.4.2:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dylan&id=43585009e834f46b1f7a8f40f1f9bd21d0f8994c
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dylan&id=2bd2fa985b40c19a0f672a686719442db726da1f

Based on the above comments this should resolve the issue.
Comment 10 Paul Eggleton 2013-08-16 14:02:07 UTC
Note that the first of the two patches in the above comment caused a regression in dylan. The fix for this is now in the dylan branch:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dylan&id=9c70e442c7b8697102a24fc9b95a5dd1b1643d1f