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,7 +116,11 @@ 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 '-'
|
||||||
cat > ./${dep_app}-ynh-deps.control << EOF # Make a control file for equivs-build
|
|
||||||
|
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
|
||||||
Section: misc
|
Section: misc
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Package: ${dep_app}-ynh-deps
|
Package: ${dep_app}-ynh-deps
|
||||||
|
@ -126,9 +130,10 @@ Architecture: all
|
||||||
Description: Fake package for ${app} (YunoHost app) dependencies
|
Description: Fake package for ${app} (YunoHost app) dependencies
|
||||||
This meta-package is only responsible of installing its dependencies.
|
This meta-package is only responsible of installing its dependencies.
|
||||||
EOF
|
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