mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] Tell apt to explain what's wrong when there are unmet dependencies (#889)
* Ask apt to explain what's wrong when dependencies fail to install * Add comment explaining the syntax Co-Authored-By: Maniack Crudelis <maniackcrudelis@users.noreply.github.com> Co-authored-by: Maniack Crudelis <maniackcrudelis@users.noreply.github.com>
This commit is contained in:
parent
2215786d6e
commit
ec80cad64a
1 changed files with 4 additions and 1 deletions
|
@ -186,7 +186,10 @@ ynh_package_install_from_equivs () {
|
|||
(cd "$TMPDIR"
|
||||
equivs-build ./control 1> /dev/null
|
||||
dpkg --force-depends -i "./${pkgname}_${pkgversion}_all.deb" 2>&1)
|
||||
ynh_package_install -f || ynh_die --message="Unable to install dependencies"
|
||||
# If install fails we use "apt-get check" to try to debug and diagnose possible unmet dependencies
|
||||
# Note the use of { } which allows to group commands without starting a subshell (otherwise the ynh_die wouldn't exit the current shell).
|
||||
# Be careful with the syntax : the semicolon + space at the end is important!
|
||||
ynh_package_install -f || { apt-get check 2>&1; ynh_die --message="Unable to install dependencies"; }
|
||||
[[ -n "$TMPDIR" ]] && rm -rf $TMPDIR # Remove the temp dir.
|
||||
|
||||
# check if the package is actually installed
|
||||
|
|
Loading…
Add table
Reference in a new issue