Upgrading a manifest v1 app to manifest v2

hello, I’ve made an app some years ago which recipe had been recently updated to manifest v2.

On 3 different servers I couldn’t upgrade my v1 installations to the new version. (and someone else had data loss)

Is it supposed to upgrade normally or do we have to do something else (installing from new)?

There is a full log on this ticket: lionwiki 2024.02.02~ynh1 · Issue #24 · YunoHost-Apps/lionwiki-t2t_ynh · GitHub

Yes, upgrading an app from v1 to v2 should appear as a transparent, regular upgrade to users and should not require any specific operation on their end (though of course there are always tricky cases, that’s just a general rule)

Quick look, your upgrade seems to be failing here : https://github.com/YunoHost-Apps/lionwiki-t2t_ynh/blob/master/scripts/upgrade#L21

maybe because the grep doesn’t find any match so maybe triggers the set -eu mode, so naively I’d try adding || true at the end (inside the brackets)

1 Like

thanks a lot, I’ll try this…

I’ve dealt with quite a few regex in my life, but I find those quite overkill :sweat_smile: and I don’t really understand what I’m doing (except that it’s trying to retrieve a value from a previous installation).

I’ve just added the || true before the last bracket:

color=$(grep -A1 'For YunoHost config' "$install_dir/templates/minimaxing/minimaxing.css" | grep -oP '^/\* @fg: #\K.*(?=;)'|| true)

I’ll try this, and let’s see what will happen :slight_smile:

merci beaucoup @Aleks , la piste était bonne. Par faute de temps j’ai pour le moment supprimé la préservation de la couleur qui est anecdotique.

la mise à jour fonctionne et sans pertes de données.