[libvirt] [libvirt-python PATCH] setup.py: fix rpm build to return 1 on error

Martin Kletzander mkletzan at redhat.com
Tue Oct 7 11:07:58 UTC 2014


On Tue, Oct 07, 2014 at 11:56:54AM +0200, Pavel Hrdina wrote:
>Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
>---
> setup.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/setup.py b/setup.py
>index 0c34ae1..c6a9ce3 100755
>--- a/setup.py
>+++ b/setup.py
>@@ -245,8 +245,8 @@ class my_rpm(Command):
>         """
>
>         self.run_command('sdist')
>-        os.system('rpmbuild -ta --clean dist/libvirt-python-%s.tar.gz' %
>-                  self.distribution.get_version())
>+        self.spawn(["/usr/bin/rpmbuild", "-ta", "--clean",
>+            "dist/libvirt-python-%s.tar.gz" % self.distribution.get_version()])
>

ACK.

This actually raises a DistutilsExecError which is properly handled
"upstairs" in the Command class.

Martin

> class my_test(Command):
>     user_options = [
>--
>2.0.4
>



>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141007/7dd5ce23/attachment-0001.sig>


More information about the libvir-list mailing list