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). Change-Id: I315f97fe619c25b36cf47ed1b7a65936b753312e
This commit is contained in:
parent
4fd84db547
commit
226e92fa4d
@ -77,11 +77,15 @@ if [ -n "$WHITELIST" ]; then
|
|||||||
else
|
else
|
||||||
PKGS=$(map-packages $WHITELIST)
|
PKGS=$(map-packages $WHITELIST)
|
||||||
fi
|
fi
|
||||||
echo "Installing $PKGS"
|
if [ -z "${PKGS}" ]; then
|
||||||
yum -y $ACTION $EXTRA_ARGS $PKGS
|
echo "Not running install-packages $ACTION with empty packages list"
|
||||||
for pkg in "$@"; do
|
else
|
||||||
if [ "$pkg" = "python-pip" ] ; then
|
echo "Running install-packages ${ACTION}. Package list: $PKGS"
|
||||||
alternatives --install /usr/bin/pip pip /usr/bin/pip-python 10
|
yum -y $ACTION $EXTRA_ARGS $PKGS
|
||||||
fi
|
for pkg in "$@"; do
|
||||||
done
|
if [ "$pkg" = "python-pip" ] ; then
|
||||||
|
alternatives --install /usr/bin/pip pip /usr/bin/pip-python 10
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user