YunoHost-Apps / paheko_ynh

Paheko package for YunoHost
https://paheko.cloud
GNU Affero General Public License v3.0
3 stars 5 forks source link

Upgrade with warnings #80

Open fflorent opened 2 weeks ago

fflorent commented 2 weeks ago

Describe the bug

When upgrading from version 1.3.11~ynh3 to version 1.3.12~ynh2, I get these warnings (full logs below):

Attention : ./upgrade: ligne 27: ynh_app_upgrading_from_version_before : commande introuvable
...
Attention : ./upgrade: ligne 142: ynh_app_upgrading_from_version_before_or_equal_to : commande introuvable

(commande introuvable means command not found)

Taking a look these 2 helpers exist: https://yunohost.org/fr/packaging_apps_helpers_v2.1#ynh-app-upgrading-from-ve-1 https://yunohost.org/fr/packaging_apps_helpers_v2.1#ynh-app-upgrading-from-ve

But only in version 2.1, which is not yet supported by this package (#67 will handle that when it will be merged, but they should be replaced by something else in the meantime).

Also the upgrade should have failed due to these warnings.

Context

Expected behavior

A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.

Logs

yunohost app upgrade paheko 
Info : Mise à jour de paheko…
Info : Creating a safety backup prior to the upgrade
Info : Collecte des fichiers devant être sauvegardés pour paheko…
Info : Declaring files to be backed up...
Info : /home/yunohost.app/paheko will not be saved, because 'BACKUP_CORE_ONLY' is set.
Info : Backup script completed for paheko. (YunoHost will then actually copy those files to the archive).
Info : Création d'une archive de sauvegarde à partir des fichiers collectés…
Info : L'archive contiendra environ 5.7MB de données.
Succès ! Sauvegarde créée : paheko-pre-upgrade2
Succès ! Sauvegarde supprimée : paheko-pre-upgrade1
Info : Updating sources...
Info : Updating system_user...
Info : Updating install_dir...
Info : Updating data_dir...
Info : Updating permissions...
Info : Updating apt...
Info : [....................] > Ensuring downward compatibility...
Attention : ./upgrade: ligne 27: ynh_app_upgrading_from_version_before : commande introuvable
Info : [++..................] > removing old conf files if they exist...
Info : [##++................] > Upgrading source files...
Info : [####+...............] > Upgrading system configurations related to paheko...
Info : [#####++.............] > Updating a configuration file...
Attention : ./upgrade: ligne 142: ynh_app_upgrading_from_version_before_or_equal_to : commande introuvable
Info : [####################] > Upgrade of paheko completed
Succès ! paheko mis à jour
Succès ! Mise à jour terminée
fflorent commented 2 weeks ago

@OniriCorpe I think the warning is due to a commit of yours: https://github.com/YunoHost-Apps/paheko_ynh/commit/1cce028f62b1f709ce91488b152688c41cb9ba35

If I am right, I just suggest to use ynh_compare_current_package_version, probably too soon to use these helpers :)

rodinux commented 2 weeks ago

D'accord, c'est un peu une regression car on voudrait passer au helpers v2.1 (avant que les v3 arrivent). Je ne suis pas certain que les tests du PR auto-helpers n'ont pas fonctionné à un moment donné d'ailleurs... Mais en attendant, merci pour ce signalement. Je lance une correction...

rodinux commented 2 weeks ago

I do another little PR recording we wanted wait next release before including the install script as in testing...

OniriCorpe commented 2 weeks ago

@OniriCorpe I think the warning is due to a commit of yours:

https://github.com/YunoHost-Apps/paheko_ynh/commit/1cce028f62b1f709ce91488b152688c41cb9ba35

If I am right, I just suggest to use ynh_compare_current_package_version, probably too soon to use these helpers :)

Nope it was @rodinux but it's fine x)

https://github.com/YunoHost-Apps/paheko_ynh/commit/26e0c8ead6e8a4ba81ecc2b0bf64d494f9f07d8e