init: better detect package existence on Apt based systems

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
This commit is contained in:
Luca Di Maio
2023-09-17 08:36:59 +02:00
parent ed24826969
commit d0db8d9781
+1 -1
View File
@@ -577,7 +577,7 @@ if [ "${upgrade}" -ne 0 ] ||
"
install_pkg=""
for dep in ${deps}; do
if apt-cache show "${dep}" > /dev/null; then
if apt-cache show "${dep}" | grep -q Package; then
install_pkg="${install_pkg} ${dep}"
fi
done