[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [jenkins-ci PATCH] jobs: ensure rpmbuild purges $RPM-ROOT/BUILD/$PACKAGE



When using 'rpmbuild --rebuild',  $RPM-ROOT/BUILD/$PACKAGE is
automatically deleted on completion, but when using 'rpmbuild --ta' it
is not deleted. We need to pass --clean to get the desired behaviour.

This was not a visible problem in the past because "git clean -fdx"
would purge the directory, but since we use %autosetup now the directory
will contain a git repo which causes "git clean" to skip deletion:

  $ su - jenkins
  $ cd libvirt-master
  $ git clean -fdx
  Skipping repository build/rpmbuild/BUILD/libvirt-4.7.0

Signed-off-by: Daniel P. Berrangé <berrange redhat com>
---
 jobs/autotools.yaml        | 2 +-
 jobs/perl-modulebuild.yaml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/jobs/autotools.yaml b/jobs/autotools.yaml
index c1d0f27..f1ebf7b 100644
--- a/jobs/autotools.yaml
+++ b/jobs/autotools.yaml
@@ -172,7 +172,7 @@
           sed -i -e 's/BuildRequires: pkgconfig(libvirt.*).*//' {name}.spec
           rm -f *.tar.{archive_format}
           $MAKE dist
-          rpmbuild --define "_topdir `pwd`/rpmbuild" -ta {name}-*.tar.{archive_format}
+          rpmbuild --clean --define "_topdir `pwd`/rpmbuild" -ta {name}-*.tar.{archive_format}
     publishers:
       - email:
           recipients: '{obj:spam}'
diff --git a/jobs/perl-modulebuild.yaml b/jobs/perl-modulebuild.yaml
index 934b216..3f3f537 100644
--- a/jobs/perl-modulebuild.yaml
+++ b/jobs/perl-modulebuild.yaml
@@ -126,7 +126,7 @@
           sed -i -e 's/BuildRequires: *libvirt.*devel.*//' *.spec
           rm -f *.tar.{archive_format}
           perl Build dist
-          rpmbuild --define "_topdir `pwd`/rpmbuild" -ta *.tar.{archive_format}
+          rpmbuild --clean --define "_topdir `pwd`/rpmbuild" -ta *.tar.{archive_format}
     publishers:
       - email:
           recipients: '{obj:spam}'
-- 
2.17.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]