<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10938</bug_id>
          
          <creation_ts>2017-01-17 18:30:19 +0000</creation_ts>
          <short_desc>non-deterministic oe-terminal spawning</short_desc>
          <delta_ts>2017-04-12 22:09:08 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>2.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Juro Bystricky">juro.bystricky</reporter>
          <assigned_to name="Juro Bystricky">juro.bystricky</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>69864</commentid>
    <comment_count>0</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-01-17 18:30:19 +0000</bug_when>
    <thetext>when running commands requiring terminal window (devshell, menuconfig),
with terminal setting set to &quot;auto&quot;, we may get a different terminal each time we repeat the command.  
I believe the reason is we try to spawn a terminal based on a hard coded priority.
Providing the user does not have &quot;tmux&quot; installed (which is more likely than not), we spawn randomly one of the Konsole, Mate, Terminology, Gnome or Xfce.
These have all the same priority set to 2 and so ordering by priority can/will result in a different order.
This can be verified by printouts, running the same command first I obtained the list:

&lt;class &apos;oe.terminal.Custom&apos;&gt;,
&lt;class &apos;oe.terminal.TmuxRunning&apos;&gt;, 
&lt;class &apos;oe.terminal.TmuxNewWindow&apos;&gt;, 
&lt;class &apos;oe.terminal.Mate&apos;&gt;, 
&lt;class &apos;oe.terminal.Terminology&apos;&gt;, 
&lt;class &apos;oe.terminal.Konsole&apos;&gt;, 
&lt;class &apos;oe.terminal.Xfce&apos;&gt;, 
&lt;class &apos;oe.terminal.Gnome&apos;&gt;, 
&lt;class &apos;oe.terminal.XTerm&apos;&gt;, 
&lt;class &apos;oe.terminal.Rxvt&apos;&gt;, 
&lt;class &apos;oe.terminal.Tmux&apos;&gt;, 
&lt;class &apos;oe.terminal.Screen&apos;&gt;]
DEBUG: zephyr-philosophers-1.6.0-r0 do_menuconfig: Attempting to spawn terminal &quot;custom&quot;
DEBUG: zephyr-philosophers-1.6.0-r0 do_menuconfig: No custom terminal (OE_TERMINAL_CUSTOMCMD) set
DEBUG: zephyr-philosophers-1.6.0-r0 do_menuconfig: Attempting to spawn terminal &quot;tmux-running&quot;
DEBUG: zephyr-philosophers-1.6.0-r0 do_menuconfig: Attempting to spawn terminal &quot;tmux-new-window&quot;
DEBUG: zephyr-philosophers-1.6.0-r0 do_menuconfig: Attempting to spawn terminal &quot;mate&quot;
DEBUG: zephyr-philosophers-1.6.0-r0 do_menuconfig: Attempting to spawn terminal &quot;terminology&quot;
DEBUG: zephyr-philosophers-1.6.0-r0 do_menuconfig: Attempting to spawn terminal &quot;konsole&quot;

running the second time I got:
&lt;class &apos;oe.terminal.Custom&apos;&gt;, 
&lt;class &apos;oe.terminal.TmuxRunning&apos;&gt;, 
&lt;class &apos;oe.terminal.TmuxNewWindow&apos;&gt;, 
&lt;class &apos;oe.terminal.Xfce&apos;&gt;, 
&lt;class &apos;oe.terminal.Mate&apos;&gt;, 
&lt;class &apos;oe.terminal.Gnome&apos;&gt;, 
&lt;class &apos;oe.terminal.Konsole&apos;&gt;, 
&lt;class &apos;oe.terminal.Terminology&apos;&gt;, 
&lt;class &apos;oe.terminal.Rxvt&apos;&gt;, 
&lt;class &apos;oe.terminal.XTerm&apos;&gt;, 
&lt;class &apos;oe.terminal.Tmux&apos;&gt;, 
&lt;class &apos;oe.terminal.Screen&apos;&gt;]
DEBUG: zephyr-philosophers-1.6.0-r0 do_menuconfig: Attempting to spawn terminal &quot;custom&quot;
DEBUG: zephyr-philosophers-1.6.0-r0 do_menuconfig: No custom terminal (OE_TERMINAL_CUSTOMCMD) set
DEBUG: zephyr-philosophers-1.6.0-r0 do_menuconfig: Attempting to spawn terminal &quot;tmux-running&quot;
DEBUG: zephyr-philosophers-1.6.0-r0 do_menuconfig: Attempting to spawn terminal &quot;tmux-new-window&quot;
DEBUG: zephyr-philosophers-1.6.0-r0 do_menuconfig: Attempting to spawn terminal &quot;xfce&quot;
DEBUG: zephyr-philosophers-1.6.0-r0 do_menuconfig: Attempting to spawn terminal &quot;mate&quot;
DEBUG: zephyr-philosophers-1.6.0-r0 do_menuconfig: Attempting to spawn terminal &quot;gnome&quot;


So the first time menuconfig popped up in konsole and the second time in gnome.
BTW &quot;Screen&quot; does not seem to have any priority set, so it probably defaults to 0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72260</commentid>
    <comment_count>1</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-04-10 21:56:00 +0000</bug_when>
    <thetext>sent a patch to the mailing list:
http://lists.openembedded.org/pipermail/openembedded-core/2017-April/135463.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72413</commentid>
    <comment_count>2</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-04-12 22:09:08 +0000</bug_when>
    <thetext>Patch merged to master:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=34db499e6bf1cd6cada582f43297085894211f75</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>