summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2013-09-09 20:05:21 +0200
committerSimon Rettberg2013-09-09 20:05:21 +0200
commitf6b40a165bc05ff43fafe11c8b1efb96b8a6a6c8 (patch)
treebeb2c9ee4e977a5801f6cdbd2170d11781db0684
parent[mltk] Add pkg-config to required dev-tools, add "exit 1" to qnd_exit just in... (diff)
downloadtm-scripts-f6b40a165bc05ff43fafe11c8b1efb96b8a6a6c8.tar.gz
tm-scripts-f6b40a165bc05ff43fafe11c8b1efb96b8a6a6c8.tar.xz
tm-scripts-f6b40a165bc05ff43fafe11c8b1efb96b8a6a6c8.zip
[helper/fileutil] Fix error handling in install_packages
-rw-r--r--helper/fileutil.inc14
1 files changed, 7 insertions, 7 deletions
diff --git a/helper/fileutil.inc b/helper/fileutil.inc
index abab7903..9f5c110f 100644
--- a/helper/fileutil.inc
+++ b/helper/fileutil.inc
@@ -91,7 +91,7 @@ install_packages() {
if [ "x$LRET" == "x0" ]; then
# package installed
pdebug "$PKG installed!"
- elif [ "x$LRET" == "x1" ]; then
+ else
# package not installed
pdebug "$PKG not installed!"
if [ "x$PACKET_MANAGER" == "xapt" ]; then
@@ -100,10 +100,10 @@ install_packages() {
if [ "x$IRET" == "x0" ]; then
# $PGK was installed successfully
INSTALLED_PACKAGES+="$PKG "
- elif [ "x$IRET" == "x1" ]; then
+ else
# PKG was not installed
# TODO error handling
- pwarning "install_packages: apt-get failed with '$?' for package '$PKG'"
+ perror "install_packages: apt-get failed with '$IRET' for package '$PKG'"
fi
elif [ "x$PACKET_MANAGER" == "xzypper" ]; then
zypper --no-refresh --non-interactive install ${PKG}
@@ -111,10 +111,10 @@ install_packages() {
if [ "x$IRET" == "x0" ]; then
# $PGK was installed successfully
INSTALLED_PACKAGES+="$PKG "
- elif [ "x$IRET" == "x1" ]; then
+ else
# PKG was not installed
# TODO error handling
- pwarning "install_packages: zypper failed with '$?' for package '$PKG'"
+ perror "install_packages: zypper failed with '$IRET' for package '$PKG'"
fi
elif [ "x$PACKET_MANAGER" == "xyum" ]; then
yum --assumeyes install ${PKG}
@@ -122,10 +122,10 @@ install_packages() {
if [ "x$IRET" == "x0" ]; then
# $PGK was installed successfully
INSTALLED_PACKAGES+="$PKG "
- elif [ "x$IRET" == "x1" ]; then
+ else
# PKG was not installed
# TODO error handling
- pwarning "install_packages: yum failed with '$?' for package '$PKG'"
+ perror "install_packages: yum failed with '$IRET' for package '$PKG'"
fi
else
perror "No packet manager determined, this should not happen!"