yum_update.sh: don't fail when plugin package is unavailable for install

Change-Id: Id1534e9d1005d48fc3893182e156503b703af405
This commit is contained in:
Julie Pichon 2019-06-12 11:14:41 +01:00
parent 8fa6dd7dde
commit 60cb00de9a
1 changed files with 7 additions and 6 deletions

View File

@ -33,13 +33,14 @@ fi
if [ $PKG_MGR == "dnf" ]; then
if ! echo $installed | grep -qw dnf-plugins-core; then
$PKG install -y dnf-plugins-core
fi
plugin=dnf-plugins-core
else
if ! echo $installed | grep -qw yum-plugin-priorities; then
$PKG install -y yum-plugin-priorities
fi
plugin=yum-plugin-priorities
fi
if $(! echo $installed | grep -qw $plugin) && $($PKG list available $plugin >/dev/null 2>&1); then
$PKG install -y $plugin
fi
$PKG -y update $packages_for_update
rm -rf /var/cache/$PKG_MGR