[libvirt] [PATCHv2] build: make autobuild require rpm build deps
Daniel P. Berrange
berrange at redhat.com
Mon Sep 16 15:56:55 UTC 2013
On Mon, Sep 16, 2013 at 09:40:32AM -0600, Eric Blake wrote:
> I spent far too long on a new machine trying to figure out why
> ./autobuild.sh failed due to an rpm build failure (complaining
> that libvirt_parthelper was supposed to be packaged but was not
> built), and finally traced it to a missing parted-devel
> installation. I learned that --nodeps is in place for
> autobuilder setups, but for developers, removing it would make
> rpmbuild error out much sooner for a less cryptic failure.
>
> * autobuild.sh: Conditionally drop --nodeps from rpmbuild lines.
>
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
>
> v2: make --nodeps conditional based on $AUTOBUILD_COUNTER; suggested
> by Dan Berrange.
>
> autobuild.sh | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/autobuild.sh b/autobuild.sh
> index e5aa35c..3109b49 100755
> --- a/autobuild.sh
> +++ b/autobuild.sh
> @@ -8,6 +8,13 @@ set -v
> test -n "$1" && RESULTS=$1 || RESULTS=results.log
> : ${AUTOBUILD_INSTALL_ROOT=$HOME/builder}
>
> +# If run under the autobuilder, we must use --nodeps with rpmbuild;
> +# but this can lead to odd error diagnosis for normal development.
> +nodeps=
> +if test "${AUTOBUILD_COUNTER+set}"; then
> + nodeps=--nodeps
> +fi
> +
> test -f Makefile && make -k distclean || :
> rm -rf coverage
>
> @@ -60,7 +67,7 @@ else
> fi
>
> if test -f /usr/bin/rpmbuild ; then
> - rpmbuild --nodeps \
> + rpmbuild $nodeps \
> --define "extra_release $EXTRA_RELEASE" \
> --define "_sourcedir `pwd`" \
> -ba --clean libvirt.spec
> @@ -111,7 +118,7 @@ fi
>
> if test -x /usr/bin/i686-w64-mingw32-gcc && test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
> if test -f /usr/bin/rpmbuild ; then
> - rpmbuild --nodeps \
> + rpmbuild $nodeps \
> --define "extra_release $EXTRA_RELEASE" \
> --define "_sourcedir `pwd`" \
> -ba --clean mingw-libvirt.spec
ACK
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list