devshell should make finding source and build artifacts easy
cover devshell should make finding source and build artifacts easy
Make finding sources and build artificts easy from a developer shell, while not affecting normal shells. Also cleans up EOL issue from first attempt at patch.
The following changes since commit 523f2a9ea970713fb775bc48f84b67420b1106a0:
cross-canadian: Improve comment (2013-10-30 18:01:34 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib blloyd/devshell
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=blloyd/devshell
blloyd (2):
Allow passthrough of important placement variables when using devshell Removed trailing whitespace added with last commit
meta/classes/devshell.bbclass | 10 ++++++++++ 1 file changed, 10 insertions(+)
Signature · 1 line
1.8.1.4
PATCH 1/2 Allow passthrough of important placement variables when using devshell
The environment is very well sanitized when using the shell. However, when using devshell developers are typically interested in sources and build artifacts. The variables B S and D control this but are cleaned from the environment when a shell is started. Add a new variable to allow additional variables to be kept for a developer shell and set it to "B S D" by default. The implementation allows variables for developer convenience and verification while not changing shells used for compile tasks.
--- meta/classes/devshell.bbclass | 10 ++++++++++ 1 file changed, 10 insertions(+)
meta/classes/devshell.bbclass +10 -0
@@ -2,7 +2,17 @@ inherit terminal DEVSHELL = "${SHELL}" +OE_DEVSHELL_TERMINAL_ADDL_EXPORTS ?= "B S D" +OE_DEVSHELL_TERMINAL_ADDL_EXPORTS[type] = 'list' + python do_devshell () { + import oe.data + import oe.terminal + export_dev=d.getVar('OE_DEVSHELL_TERMINAL_ADDL_EXPORTS') + export_term=d.getVar('OE_TERMINAL_EXPORTS') + export_term = export_term + ' ' + export_dev + d.setVar('OE_TERMINAL_EXPORTS', export_term) + if d.getVarFlag("do_devshell", "manualfakeroot"): d.prependVar("DEVSHELL", "pseudo ") fakeenv = d.getVar("FAKEROOTENV", True).split()
Signature · 1 line
1.8.1.4
Re: [PATCH 1/2] Allow passthrough of important placement variables when using devshell
Quoted 12 lines · blloyd
The environment is very well sanitized when using the shell. However, when using devshell developers are typically interested in sources and build artifacts. The variables B S and D control this but are cleaned from the environment when a shell is started. Add a new variable to allow additional variables to be kept for a developer shell and set it to "B S D" by default. The implementation allows variables for developer convenience and verification while not changing shells used for compile tasks.
Signed-off-by blloyd <[email protected]>--- meta/classes/devshell.bbclass | 10 ++++++++++ 1 file changed, 10 insertions(+)meta/classes/devshell.bbclass +0
-0
meta/classes/devshell.bbclass inherit terminal · line 6
Quoted 5 lines
meta/classes/devshell.bbclass +2
-0@@ -2,7 +2,17 @@ inherit terminal DEVSHELL = "${SHELL}" +OE_DEVSHELL_TERMINAL_ADDL_EXPORTS ?= "B S D" +OE_DEVSHELL_TERMINAL_ADDL_EXPORTS[type] = 'list'
Can we call this something like DEVSHELL_EXTRA_ENVVARS which is a little simpler?
meta/classes/devshell.bbclass inherit terminal · line 10
Quoted 3 lines
meta/classes/devshell.bbclass +2
-0python do_devshell () { + import oe.data + import oe.terminal
Why do we need to import these?
meta/classes/devshell.bbclass inherit terminal · line 11
Quoted 1 line
meta/classes/devshell.bbclass +1
-0+ export_dev=d.getVar('OE_DEVSHELL_TERMINAL_ADDL_EXPORTS')
We should probably use ", True" here and expand since that is the common behaviour. I'd also prefer " = " for consistent spacing.
meta/classes/devshell.bbclass inherit terminal · line 12
Quoted 1 line
meta/classes/devshell.bbclass +1
-0+ export_term=d.getVar('OE_TERMINAL_EXPORTS')
ditto spacing and ", True".
meta/classes/devshell.bbclass inherit terminal · line 18
Quoted 6 lines
meta/classes/devshell.bbclass +3
-0+ export_term = export_term + ' ' + export_dev + d.setVar('OE_TERMINAL_EXPORTS', export_term) + if d.getVarFlag("do_devshell", "manualfakeroot"): d.prependVar("DEVSHELL", "pseudo ") fakeenv = d.getVar("FAKEROOTENV", True).split()
Cheers,
Richard
Re: [PATCH 1/2] Allow passthrough of important placement variables when using devshell
In reply to blloydQuoted 6 lines · blloyd
The environment is very well sanitized when using the shell. However, when using devshell developers are typically interested in sources and build artifacts. The variables B S and D control this but are cleaned from the environment when a shell is started. Add a new variable to allow additional variables to be kept for a developer shell and set it to "B S D" by default. The implementation allows variables for developer convenience and verification while not changing shells used for compile tasks.
Signed-off-by blloyd <[email protected]>--- meta/classes/devshell.bbclass | 10 ++++++++++ 1 file changed, 10 insertions(+)
Also, the summary of the commit message should start "devshell: " and you should fold in the whitespace fix patch.
Cheers,
Richard
PATCH 2/2 Removed trailing whitespace added with last commit
In reply to blloyd--- meta/classes/devshell.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/devshell.bbclass +1 -1
@@ -8,7 +8,7 @@ OE_DEVSHELL_TERMINAL_ADDL_EXPORTS[type] = 'list' python do_devshell () { import oe.data import oe.terminal - export_dev=d.getVar('OE_DEVSHELL_TERMINAL_ADDL_EXPORTS') + export_dev=d.getVar('OE_DEVSHELL_TERMINAL_ADDL_EXPORTS') export_term=d.getVar('OE_TERMINAL_EXPORTS') export_term = export_term + ' ' + export_dev d.setVar('OE_TERMINAL_EXPORTS', export_term)
Signature · 1 line
1.8.1.4