[omd-commits] OMD Git: omd: tests: run apt-get update before installing omd .deb package
git version control
git at mathias-kettner.de
Wed Dec 22 20:03:06 CET 2010
Module: omd
Branch: master
Commit: 20667276f9c2a26f22555fe2eae3167accd2d40f
URL: http://omdistro.org/projects/omd/repository/revisions/20667276f9c2a26f22555fe2eae3167accd2d40f
Author: Sven Nierlein <sven at nierlein.de>
Date: Wed Dec 22 17:47:22 2010 +0100
tests: run apt-get update before installing omd .deb package
---
t/test_all.sh | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/t/test_all.sh b/t/test_all.sh
index 9a3c6e4..653ed5a 100755
--- a/t/test_all.sh
+++ b/t/test_all.sh
@@ -24,8 +24,7 @@ if [ ! -z "$OMD_PACKAGE" ]; then
# Debian / Ubuntu
if [ -x /usr/bin/apt-get ]; then
- DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install `dpkg-deb --info $OMD_PACKAGE | grep Depends: | sed -e 's/Depends://' -e 's/debconf.*debconf-2.0,//' | tr -d ','`
- dpkg -i $OMD_PACKAGE
+ apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install `dpkg-deb --info $OMD_PACKAGE | grep Depends: | sed -e 's/Depends://' -e 's/debconf.*debconf-2.0,//' | tr -d ','` && dpkg -i $OMD_PACKAGE
# Centos
elif [ -x /usr/bin/yum ]; then
@@ -35,6 +34,12 @@ if [ ! -z "$OMD_PACKAGE" ]; then
elif [ -x /usr/bin/zypper ]; then
/usr/bin/zypper install -n -l --no-recommends $OMD_PACKAGE
fi
+
+ rc=$?
+ if [ $rc -ne 0 ]; then
+ echo "Package installation failed, cannot run tests..."
+ exit 1
+ fi
fi
if [ -z $OMD_BIN ]; then
More information about the omd-commits
mailing list