All of lore.kernel.org
 help / color / mirror / Atom feed
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/2] Rework how the devshell functions
Date: Wed, 13 Jul 2011 20:36:11 +0100	[thread overview]
Message-ID: <1310585771.20015.1121.camel@rex> (raw)
In-Reply-To: <2a927e54abaec88f79de810e5b48293d4db4740a.1310581914.git.kergoth@gmail.com>

On Wed, 2011-07-13 at 11:35 -0700, Christopher Larson 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>
> ---
>  meta/classes/devshell.bbclass |   29 +++++-------
>  meta/classes/terminal.bbclass |   30 ++++++++++++
>  meta/lib/oe/terminal.py       |  102 +++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 144 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..95c29f3 100644
> --- a/meta/classes/devshell.bbclass
> +++ b/meta/classes/devshell.bbclass
> @@ -1,22 +1,17 @@
> -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
> +export XAUTHORITY ?= "${HOME}/.Xauthority"
> +export SHELL ?= "bash"
> +export DBUS_SESSION_BUS_ADDRESS
> +export DISPLAY
> +export EXTRA_OEMAKE

Variables that are placed into the global environment affect the
checksums of any shell tasks when they change so I don't think we can do
this (and its why they are in a function as above).

Perhaps we could list the variables we want to export in a variable and
then pass that list to popen's environment?

Cheers,

Richard




  reply	other threads:[~2011-07-13 19:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-13 18:35 [PATCH 0/2] [PULL REQUEST,v2] Rework the devshell Christopher Larson
2011-07-13 18:35 ` [PATCH 1/2] Rework how the devshell functions Christopher Larson
2011-07-13 19:36   ` Richard Purdie [this message]
2011-07-13 19:45     ` Chris Larson
2011-07-13 18:35 ` [PATCH 2/2] oe.terminal: improve how we spawn screen Christopher Larson
  -- strict thread matches above, loose matches on Subject: below --
2011-08-09 18:05 [PATCH(v3) 0/2] Rework the devshell Christopher Larson
2011-08-09 18:05 ` [PATCH 1/2] Rework how the devshell functions Christopher Larson

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=1310585771.20015.1121.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.