1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/fider_ynh.git synced 2024-09-03 18:36:11 +02:00

Remove backports repository

This commit is contained in:
Salamandar 2022-12-03 17:55:20 +01:00
parent aae5bc4571
commit 040d0b15a9
4 changed files with 9 additions and 14 deletions

View file

@ -7,7 +7,8 @@
nodejs_version=16 nodejs_version=16
# dependencies used by the app (must be on a single line) # dependencies used by the app (must be on a single line)
pkg_dependencies="golang-1.18-go postgresql" pkg_dependencies="postgresql"
pkg_dependency_golang="golang-1.18-go"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS
@ -42,17 +43,10 @@ build_fider() {
# EXPERIMENTAL HELPERS # EXPERIMENTAL HELPERS
#================================================= #=================================================
_ynh_enable_backports() { install_golang_from_backports() {
version=$(ynh_get_debian_release) ynh_exec_warn_less ynh_install_extra_app_dependencies \
backports_file="/etc/apt/sources.list.d/backports_$version.list" --repo="deb http://deb.debian.org/debian $version-backports main contrib non-free" \
if [[ -f "$backports_file" ]]; then --package="$pkg_dependency_golang"
return 0
fi
{
echo "deb http://deb.debian.org/debian $version-backports main contrib non-free"
echo "deb-src http://deb.debian.org/debian $version-backports main contrib non-free"
} > "$backports_file"
apt update
} }
#================================================= #=================================================

View file

@ -69,8 +69,8 @@ ynh_app_setting_set --app=$app --key=port --value=$port
#================================================= #=================================================
ynh_script_progression --message="Installing dependencies..." --weight=1 ynh_script_progression --message="Installing dependencies..." --weight=1
_ynh_enable_backports
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
install_golang_from_backports
ynh_install_nodejs --nodejs_version=$nodejs_version ynh_install_nodejs --nodejs_version=$nodejs_version
#================================================= #=================================================

View file

@ -82,8 +82,8 @@ chmod +x "$final_path/run_fider"
ynh_script_progression --message="Reinstalling dependencies..." --weight=1 ynh_script_progression --message="Reinstalling dependencies..." --weight=1
# Define and install dependencies # Define and install dependencies
_ynh_enable_backports
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
install_golang_from_backports
#================================================= #=================================================
# RESTORE THE NGINX CONFIGURATION # RESTORE THE NGINX CONFIGURATION

View file

@ -102,6 +102,7 @@ chown -R $app:www-data "$final_path"
ynh_script_progression --message="Upgrading dependencies..." --weight=1 ynh_script_progression --message="Upgrading dependencies..." --weight=1
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
install_golang_from_backports
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION