[virt-tools-list] [PATCH 1/2] update autobuild.sh so it works

Gene Czarcinski gene at czarc.net
Thu Apr 4 16:41:30 UTC 2013


There a some problems with autobuild.sh and this patch addresses
them:

1. Some of the tests fail so temporarily comment out
"prython setup.py test" until things are fixed so the tests
run correctly.  At that time, this should be uncommented.

2. "python setup.py install" needs to use --root= instead
of --prefix=

3. For the rpmbuild, use dist/*tar.gz instead of *.tar.gz

4. "python setup.py build" modifies the git tracked/managed
file po/virt-manager.pot so that you end of with uncommitted
changes.  To correct this: use the sdist created tarball,
expand it into a local/unmangerd directory and run build,
test, and install out of this directory.
.
Signed-off-by: Gene Czarcinski <gene at czarc.net>
---
 autobuild.sh | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/autobuild.sh b/autobuild.sh
index baa9482..023b830 100755
--- a/autobuild.sh
+++ b/autobuild.sh
@@ -1,5 +1,6 @@
 #!/bin/sh
-
+# python setup.py build modifies git tracked/managed po/virt-manager.pot.
+# put build/test/install into its own (temporary) directroy-tree
 set -v
 set -e
 
@@ -9,11 +10,20 @@ if [ -z "$AUTOBUILD_INSTALL_ROOT" ] ; then
     exit 1
 fi
 
-python setup.py build
-python setup.py test
-python setup.py install --prefix=$AUTOBUILD_INSTALL_ROOT
+rm -rf MANIFEST dist/* installdir
+
 python setup.py sdist
 
+mkdir installdir
+tar -vzxf dist/*.tar.gz -C installdir/
+mv installdir/* installdir/v-m
+cd installdir/v-m
+python setup.py build
+#python setup.py test
+python setup.py install --root=$AUTOBUILD_INSTALL_ROOT
+cd ../../
+rm -rf installdir
+
 which /usr/bin/rpmbuild > /dev/null 2>&1 || exit 0
 
 if [ -n "$AUTOBUILD_COUNTER" ]; then
@@ -22,5 +32,5 @@ else
     NOW=`date +"%s"`
     EXTRA_RELEASE=".$USER$NOW"
 fi
-rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ta --clean *.tar.gz
+rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ta --clean dist/*.tar.gz
 
-- 
1.8.1.4




More information about the virt-tools-list mailing list