[OE-core] devshell problems after distro upgrade openSUSE Leap 42.3 -> 15.0 (tmux only)

Mike Crowe mac at mcrowe.com
Wed Nov 21 18:28:31 UTC 2018


On Tuesday 06 November 2018 at 19:06:45 +0000, Mike Crowe wrote:
> On Monday 16 July 2018 at 08:19:11 +0200, Steffen Sledz wrote:
> > On 04.07.2018 13:37, Steffen Sledz wrote:
> > > On 03.07.2018 08:04, Steffen Sledz wrote:
> > >> On 02.07.2018 20:25, Khem Raj wrote:
> > >>> On Sun, Jul 1, 2018 at 11:39 PM Steffen Sledz <sledz at dresearch-fe.de> wrote:
> > >>>>
> > >>>> After upgrading my build system from openSUSE Leap 42.3 to openSUSE Leap 15.0 a
> > >>>>
> > >>>>   bitbake foo -c devshell
> > >>>>
> > >>>> no longer switches to the related work directory. The devshell is opened in the original directory without any error or warning instead.
> > >>>>
> > >>>> Any hints what's wrong here or how I can debug this behaviour?
> > >>>>
> > >>>
> > >>> which terminal are you using, probably some default behavior changes there ?
> > >>
> > >> Main terminal is xterm. No special settings for the devshell terminal, so tmux is started like before.
> > > 
> > > 
> > > After some more tests I can limit the problem to OE_TERMINAL="tmux". Other terminals like screen or xterm work well.
> > > ...
> > 
> > 
> > Ping!
> 
> The same problem happens with Debian Buster (currently "testing".) I was
> unable to reproduce the problem when running
> 
>  (cd subdirectory && tmux split-window)
> 
> from a shell prompt.
> 
> However, I managed to fix it with the following patch. I'm not sure whether
> this means there's a bug in tmux though. Since I can't reproduce the
> problem outside OE, it's rather difficult to report it.

It looks like tmux now honours the PWD environment variable. If I run:

 cd /
 PWD=/etc tmux split-window

on Debian 9 then I end up with the split window shell in / whereas in
Debian 10 I end up with the split window shell in /etc.

It seems that terminal.py changes the current directory but does not set
PWD. I've entered https://github.com/tmux/tmux/issues/1549 , but I don't
really expect them to do anything about it.

So, how should I best fix this in oe-core? My previous patch to pass the
current directory to tmux explicitly on the command line works. I tried
changing PWD too, but that is problematic when the environment parameter is
None.

(Whatever solution is found will be required for TmuxNewWindow too.)

Mike.


More information about the Openembedded-core mailing list