On 04/13/10 05:02 PM, Karen Tung wrote:
On 04/13/10 12:21, [email protected] wrote:
Hello,
This webrev is my proposed fix to the following installadm bugs:
7481 Remove use of site-specific option, GrubMenu, from AI setup
15531 installadm build_136 creates bad macro for X86 service
15593 create-client: needs to quote dhtadm macro strings again
In testing, I found the following and propose to fix it too,
supplying doctests to document and test the run_cmd() API:
15588 installadm_common: run_cmd() should raise OSError if
non-existent
command is attempted
Webrev:
http://cr.opensolaris.org/~clayb/15531/
Hi Clay,
I only looked at installadm_common.py so far, and I want to comment on
the run_cmd() function.
Very very similar functionality already exists in
usr/src/lib/install_utils/install_utils.py,
exec_cmd_outputs_to_log() function. Can we somehow just have 1
function that
does the same thing?
We have far more than just those two. Besides "run_cmd" and
"exec_cmd_outputs_to_log", we also have:
ai_exec_cmd in ai_get_manifest.py
shell_cmd in dc_checkpoint.py
exec_cmd in ti_install.py (which is simply a thin wrapper around
exec_cmd_outputs_to_log)
_cmd_out AND _cmd_status in ict.py
run_command in transfer_mod.py
(and maybe we have more with different names - this was simply a search
in our gate for "def.*cmd" in any .py files)
All of which provide minimal functionality beyond the existing
capabilities of the Python subprocess module. If we truly need a
"simple" exec_cmd type function for install, it should be included in
the new engine as a module that extends the subprocess.Popen class. But
I'd argue against even that. The subprocess module, between the Popen
class it provides and the "call" and "check_call" standalone methods,
provides more than enough options for simplicity and complexity.
- Keith
Thanks,
--Karen
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss