mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Prevent to rewrite the previous control file
This commit is contained in:
parent
2bb32c26b6
commit
5f3fcefc88
1 changed files with 9 additions and 4 deletions
|
@ -116,6 +116,10 @@ ynh_app_dependencies () {
|
||||||
fi
|
fi
|
||||||
version=$(sudo python3 -c "import sys, json;print(json.load(open(\"$manifest_path\"))['version'])") # Retrieve the version number in the manifest file.
|
version=$(sudo python3 -c "import sys, json;print(json.load(open(\"$manifest_path\"))['version'])") # Retrieve the version number in the manifest file.
|
||||||
dep_app=${app//_/-} # Replace all '_' by '-'
|
dep_app=${app//_/-} # Replace all '_' by '-'
|
||||||
|
|
||||||
|
if ynh_package_is_installed "${dep_app}-ynh-deps"; then
|
||||||
|
echo "A package named ${dep_app}-ynh-deps is already installed" >&2
|
||||||
|
else
|
||||||
cat > ./${dep_app}-ynh-deps.control << EOF # Make a control file for equivs-build
|
cat > ./${dep_app}-ynh-deps.control << EOF # Make a control file for equivs-build
|
||||||
Section: misc
|
Section: misc
|
||||||
Priority: optional
|
Priority: optional
|
||||||
|
@ -129,6 +133,7 @@ EOF
|
||||||
ynh_package_install_from_equivs ./${dep_app}-ynh-deps.control \
|
ynh_package_install_from_equivs ./${dep_app}-ynh-deps.control \
|
||||||
|| ynh_die "Unable to install dependencies" # Install the fake package and its dependencies
|
|| ynh_die "Unable to install dependencies" # Install the fake package and its dependencies
|
||||||
ynh_app_setting_set $app apt_dependencies $dependencies
|
ynh_app_setting_set $app apt_dependencies $dependencies
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Remove fake package and its dependencies
|
# Remove fake package and its dependencies
|
||||||
|
|
Loading…
Add table
Reference in a new issue