Fix rare case when apt and rpm package managers are found (#5827)
This commit is contained in:
commit
d030492664
|
@ -484,9 +484,8 @@ build_dependency_package(){
|
||||||
|
|
||||||
# Move back into the directory the user started in
|
# Move back into the directory the user started in
|
||||||
popd &> /dev/null || return 1
|
popd &> /dev/null || return 1
|
||||||
fi
|
|
||||||
|
|
||||||
if is_command rpm; then
|
elif is_command rpm; then
|
||||||
# move into the tmp directory
|
# move into the tmp directory
|
||||||
pushd /tmp &>/dev/null || return 1
|
pushd /tmp &>/dev/null || return 1
|
||||||
|
|
||||||
|
@ -517,6 +516,13 @@ build_dependency_package(){
|
||||||
|
|
||||||
# Move back into the directory the user started in
|
# Move back into the directory the user started in
|
||||||
popd &> /dev/null || return 1
|
popd &> /dev/null || return 1
|
||||||
|
|
||||||
|
# If neither apt-get or yum/dnf package managers were found
|
||||||
|
else
|
||||||
|
# we cannot build required packages
|
||||||
|
printf " %b No supported package manager found\\n" "${CROSS}"
|
||||||
|
# so exit the installer
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove the build directory
|
# Remove the build directory
|
||||||
|
@ -1511,10 +1517,8 @@ install_dependent_packages() {
|
||||||
printf " %b Error: Unable to find Pi-hole dependency meta package.\\n" "${COL_LIGHT_RED}"
|
printf " %b Error: Unable to find Pi-hole dependency meta package.\\n" "${COL_LIGHT_RED}"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
# Install Fedora/CentOS packages
|
# Install Fedora/CentOS packages
|
||||||
if is_command rpm; then
|
elif is_command rpm; then
|
||||||
if [ -f /tmp/pihole-meta.rpm ]; then
|
if [ -f /tmp/pihole-meta.rpm ]; then
|
||||||
eval "${PKG_INSTALL}" "/tmp/pihole-meta.rpm"
|
eval "${PKG_INSTALL}" "/tmp/pihole-meta.rpm"
|
||||||
rm /tmp/pihole-meta.rpm
|
rm /tmp/pihole-meta.rpm
|
||||||
|
@ -1523,7 +1527,14 @@ install_dependent_packages() {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If neither apt-get or yum/dnf package managers were found
|
||||||
|
else
|
||||||
|
# we cannot install the dependency package
|
||||||
|
printf " %b No supported package manager found\\n" "${CROSS}"
|
||||||
|
# so exit the installer
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "\\n"
|
printf "\\n"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue