Nextcloud update (29.0.10~ynh2 > 30.0.4~ynh1) fails due to an error with dpkg-query

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.9
What app is this about: Nextcloud

Describe your issue

I tried to update my 2 Nextcloud instances (same server but separate domain). Nothing to report on the nextcloud instance but it fails on the nextcloud__2 instance.

According to the logs, this is due to a problem with the command dpkg-query --show '--showformat=${Depends}' nextcloud__2-ynh-deps.

In SSH, I reproduce the error but it seems to work better with dpkg-query --show '--showformat=${Depends}' nextcloud--2-ynh-deps… Unfortunately, I didn’t find how to fix this in the upgrade script!

Thanks

Share relevant logs or error messages

https://paste.yunohost.org/raw/muqakeyaya

1 Like

Hi,
same here.
https://paste.yunohost.org/raw/abipezuguy

I have noticed this :

Info: Deprovisioning apt…
Warning: ./deprovision_apt: line 5: ynh_apt_remove_dependencies: command not found
Error: deprovision failed for apt : An error occured inside the script snippet
Info: The operation ‘Remove the ‘nextcloud__2’ app’ could not be completed.

2024-12-19 22:36:35,057: WARNING - dpkg-deb: error: parsing file '/tmp/tmp.dXlwmQwETK/nextcloud--2-ynh-deps/DEBIAN/control' near line 5 package 'nextcloud--2-ynh-deps':
2024-12-19 22:36:35,058: WARNING -  'Depends' field, missing package name, or garbage where package name expected
2024-12-19 22:36:35,059: DEBUG - ++ ynh_die '--message=Unable to install dependencies'
2024-12-19 22:36:35,310: WARNING - --message=Unable to install dependencies

We found a fix, can you try from the testing branch

sudo yunohost app upgrade nextcloud__2 -u https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing --debug
1 Like

:rocket: Thank you for your quick help!

:muscle: I was able to update successfully, the problem is also fixed on my side.