Rework how the devshell functions
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
(From OE-Core rev: 69f77f80965fa06a057837f8f49eda06855c4086)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-29 19:53:19 +00:00
|
|
|
inherit terminal
|
2007-09-17 08:14:16 +00:00
|
|
|
|
2013-02-18 13:19:50 +00:00
|
|
|
DEVSHELL = "${SHELL}"
|
|
|
|
|
Rework how the devshell functions
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
(From OE-Core rev: 69f77f80965fa06a057837f8f49eda06855c4086)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-29 19:53:19 +00:00
|
|
|
python do_devshell () {
|
2013-09-05 15:17:27 +00:00
|
|
|
if d.getVarFlag("do_devshell", "manualfakeroot"):
|
|
|
|
d.prependVar("DEVSHELL", "pseudo ")
|
|
|
|
fakeenv = d.getVar("FAKEROOTENV", True).split()
|
|
|
|
for f in fakeenv:
|
|
|
|
k = f.split("=")
|
|
|
|
d.setVar(k[0], k[1])
|
|
|
|
d.appendVar("OE_TERMINAL_EXPORTS", " " + k[0])
|
|
|
|
d.delVarFlag("do_devshell", "fakeroot")
|
|
|
|
|
2013-02-18 13:19:50 +00:00
|
|
|
oe_terminal(d.getVar('DEVSHELL', True), 'OpenEmbedded Developer Shell', d)
|
2006-08-30 22:11:12 +00:00
|
|
|
}
|
|
|
|
|
Rework how the devshell functions
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
(From OE-Core rev: 69f77f80965fa06a057837f8f49eda06855c4086)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-29 19:53:19 +00:00
|
|
|
addtask devshell after do_patch
|
2006-08-30 22:11:12 +00:00
|
|
|
|
Rework how the devshell functions
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
(From OE-Core rev: 69f77f80965fa06a057837f8f49eda06855c4086)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-29 19:53:19 +00:00
|
|
|
do_devshell[dirs] = "${S}"
|
|
|
|
do_devshell[nostamp] = "1"
|
2013-02-18 13:19:50 +00:00
|
|
|
|
|
|
|
# devshell and fakeroot/pseudo need careful handling since only the final
|
|
|
|
# command should run under fakeroot emulation, any X connection should
|
|
|
|
# be done as the normal user. We therfore carefully construct the envionment
|
|
|
|
# manually
|
|
|
|
python () {
|
|
|
|
if d.getVarFlag("do_devshell", "fakeroot"):
|
2013-09-05 15:17:27 +00:00
|
|
|
# We need to signal our code that we want fakeroot however we
|
|
|
|
# can't manipulate the environment and variables here yet (see YOCTO #4795)
|
|
|
|
d.setVarFlag("do_devshell", "manualfakeroot", "1")
|
2013-02-18 13:19:50 +00:00
|
|
|
d.delVarFlag("do_devshell", "fakeroot")
|
|
|
|
}
|