tap2rpm should not use os.system for running other commands

[email protected] Thu, 12 Nov 2009 05:21:28 -0000
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from TimAllen <[email protected]>:

Currently tap2rpm uses os.system to call various commands including tar and rpmbuild, which has two issues:

 * Little attempt has been made at quoting, which means a single `$` or `"` could make the whole thing blow up.
 * The entire, horribly verbose rpm build process gets dumped to stdout.

tap2rpm should be updated to use Python's `popen2` or `subprocess` modules, or even Twisted's own t.i.utils.getProcessOutputAndValue(). If the return value is zero, the process has probably been successful and the output can be discarded; otherwise the output probably contains useful error messages and should be printed.

----------
Type     : enhancement
Component: core
Keywords : 
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/4085