[fix] helpers apt: Remove boring message about 'file.asc' wasnt deleted because it doesnt exists

This commit is contained in:
Alexandre Aubin 2022-01-16 03:27:14 +01:00
parent b1fe61ed68
commit 5479befabb

View file

@ -497,8 +497,14 @@ ynh_remove_extra_repo() {
ynh_secure_remove --file="/etc/apt/sources.list.d/$name.list" ynh_secure_remove --file="/etc/apt/sources.list.d/$name.list"
# Sury pinning is managed by the regenconf in the core... # Sury pinning is managed by the regenconf in the core...
[[ "$name" == "extra_php_version" ]] || ynh_secure_remove "/etc/apt/preferences.d/$name" [[ "$name" == "extra_php_version" ]] || ynh_secure_remove "/etc/apt/preferences.d/$name"
ynh_secure_remove --file="/etc/apt/trusted.gpg.d/$name.gpg" >/dev/null if [ -e /etc/apt/trusted.gpg.d/$name.gpg ]; then
ynh_secure_remove --file="/etc/apt/trusted.gpg.d/$name.asc" >/dev/null ynh_secure_remove --file="/etc/apt/trusted.gpg.d/$name.gpg"
fi
# (Do we even create a .asc file anywhere ...?)
if [ -e /etc/apt/trusted.gpg.d/$name.asc ]; then
ynh_secure_remove --file="/etc/apt/trusted.gpg.d/$name.asc"
fi
# Update the list of package to exclude the old repo # Update the list of package to exclude the old repo
ynh_package_update ynh_package_update