From 24e33592c281e96ff471fd3d898d1d164186832e Mon Sep 17 00:00:00 2001 From: Ghe Rivero Date: Wed, 2 Jul 2014 14:27:59 +0000 Subject: [PATCH] Avoid to install a blank list of packages There are some situations where the list of packages to install in a image is blank (packages blacklisted) on opensuse based distributions. Change-Id: Ib720473fa63671ed974d41a86fe10a9b10720f5d --- elements/opensuse/bin/install-packages | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/elements/opensuse/bin/install-packages b/elements/opensuse/bin/install-packages index d556c9db..3c6b3097 100755 --- a/elements/opensuse/bin/install-packages +++ b/elements/opensuse/bin/install-packages @@ -78,5 +78,9 @@ if [ -n "$WHITELIST" ]; then else PKGS=$(map-packages $WHITELIST) fi - run_zypper install $EXTRA_ARGS $PKGS + if [ -z "${PKGS}" ]; then + echo 'No packages need to be installed' + else + run_zypper install $EXTRA_ARGS $PKGS + fi fi