From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Cc: Chris Larson <chris_larson@mentor.com>
Subject: Re: [PATCH 1/8] Rework how the devshell functions
Date: Fri, 08 Jul 2011 16:33:12 +0100 [thread overview]
Message-ID: <1310139192.20015.888.camel@rex> (raw)
In-Reply-To: <3e091c2f3f0f39d3557004dba908b650e9aea7fb.1310132765.git.otavio@ossystems.com.br>
On Fri, 2011-07-08 at 13:47 +0000, Otavio Salvador wrote:
> From: Chris Larson <chris_larson@mentor.com>
>
> In the new implementation, each known terminal is defined as a class in
> oe.terminal, as a subclass of bb.process.Popen. terminal.bbclass wraps this
> functionality, providing the metadata pieces. It obeys the OE_TERMINAL
> variable, which is a 'choice' typed variable. This variable may be 'auto',
> 'none', or any of the names of the defined terminals.
>
> When using 'auto', or requesting an unsupported terminal, we attempt to spawn
> them in priority order until we get one that's available on this system (and
> in the case of the X terminals, has DISPLAY defined). The 'none' value is
> used when we're doing things like automated builds, and want to ensure that no
> terminal is *ever* spawned, under any circumstances.
>
> Current available terminals:
>
> gnome
> konsole
> xterm
> rxvt
> screen
>
> Signed-off-by: Chris Larson <chris_larson@mentor.com>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
> meta/classes/devshell.bbclass | 26 ++++-------
> meta/classes/terminal.bbclass | 30 ++++++++++++
> meta/lib/oe/classutils.py | 2 +
> meta/lib/oe/terminal.py | 102 +++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 143 insertions(+), 17 deletions(-)
> create mode 100644 meta/classes/terminal.bbclass
> create mode 100644 meta/lib/oe/terminal.py
>
> diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass
> index 5f262f4..7317d64 100644
> --- a/meta/classes/devshell.bbclass
> +++ b/meta/classes/devshell.bbclass
> @@ -1,22 +1,14 @@
> -do_devshell[dirs] = "${S}"
> -do_devshell[nostamp] = "1"
> +inherit terminal
>
> -XAUTHORITY ?= "${HOME}/.Xauthority"
>
> -devshell_do_devshell() {
> - export DISPLAY='${DISPLAY}'
> - export DBUS_SESSION_BUS_ADDRESS='${DBUS_SESSION_BUS_ADDRESS}'
> - export XAUTHORITY='${XAUTHORITY}'
> - export TERMWINDOWTITLE="Bitbake Developer Shell"
> - export EXTRA_OEMAKE='${EXTRA_OEMAKE}'
> - export SHELLCMDS="bash"
> - ${TERMCMDRUN}
> - if [ $? -ne 0 ]; then
> - echo "Fatal: '${TERMCMD}' not found. Check TERMCMD variable."
> - exit 1
> - fi
For reference, the reason I keep putting off merging this is that there
are a number of variables above that were added there for a reason (e.g.
DBUS_SESSION_BUS_ADDRESS) and this patch wipes them out.
The patch therefore makes someone's usecase work better and the expense
of breaking some others and to me that doesn't make a good patch.
I'm the first to agree that the bitbake environment handling sucks,
badly. It would be nice if there were some way we could save off the
original environment and then restore it under certain conditions which
would then make the need for gross code like the above go away. Likely
that would need changes at the bitbake level but I think we need to try
and fix this problem properly...
[I'm fine with the other changes that patch makes, I just worry about
the environment bits]
Cheers,
Richard
next prev parent reply other threads:[~2011-07-08 16:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-08 13:47 [PATCH 0/8] Patches pending for merging from O.S. Systems tree Otavio Salvador
2011-07-08 13:47 ` [PATCH 1/8] Rework how the devshell functions Otavio Salvador
2011-07-08 15:33 ` Richard Purdie [this message]
2011-07-08 13:47 ` [PATCH 2/8] oe.terminal: improve how we spawn screen Otavio Salvador
2011-07-08 13:47 ` [PATCH 3/8] cmake.bbclass: use CPPFLAGS and CXXFLAGS Otavio Salvador
2011-07-08 15:34 ` Richard Purdie
2011-07-08 13:47 ` [PATCH 4/8] cmake: refactor recipe Otavio Salvador
2011-07-08 15:27 ` Richard Purdie
2011-07-08 13:47 ` [PATCH 5/8] libarchive: add 2.8.4 version Otavio Salvador
2011-07-08 15:27 ` Richard Purdie
2011-07-08 15:50 ` Otavio Salvador
2011-07-08 16:18 ` Richard Purdie
2011-07-08 16:47 ` Otavio Salvador
2011-07-08 13:47 ` [PATCH 6/8] cmake: add nativesdk and target versions Otavio Salvador
2011-07-08 15:28 ` Richard Purdie
2011-07-08 15:49 ` Otavio Salvador
2011-07-08 16:08 ` Paul Eggleton
2011-07-08 16:22 ` Richard Purdie
2011-07-08 16:36 ` Paul Eggleton
2011-07-08 13:47 ` [PATCH 7/8] cmake: update to 2.8.5-rc3 Otavio Salvador
2011-07-08 15:35 ` Richard Purdie
2011-07-08 15:41 ` Otavio Salvador
2011-07-08 13:47 ` [PATCH 8/8] fix SDK building due TARGET_ARCH use in installation path Otavio Salvador
2011-07-08 15:38 ` Richard Purdie
2011-07-08 16:12 ` Koen Kooi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1310139192.20015.888.camel@rex \
--to=richard.purdie@linuxfoundation.org \
--cc=chris_larson@mentor.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox