File tree 2 files changed +9
-18
lines changed
2 files changed +9
-18
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ ynh_setup_source() {
248
248
if test -e " $local_src " ; then
249
249
cp $local_src $src_filename
250
250
fi
251
-
251
+
252
252
[ -n " $src_url " ] || ynh_die " Couldn't parse SOURCE_URL from $src_file_path ?"
253
253
254
254
# If the file was prefetched but somehow doesn't match the sum, rm and redownload it
@@ -990,15 +990,11 @@ ynh_app_package_version() {
990
990
# This helper should be used to avoid an upgrade of an app, or the upstream part
991
991
# of it, when it's not needed
992
992
#
993
- # You can force an upgrade, even if the package is up to date, with the `--force` (or `-F`) argument :
994
- # ```
995
- # sudo yunohost app upgrade <appname> --force
996
- # ```
997
993
# Requires YunoHost version 3.5.0 or higher.
998
994
ynh_check_app_version_changed () {
999
995
local return_value=${YNH_APP_UPGRADE_TYPE}
1000
996
1001
- if [ " $return_value " == " UPGRADE_FULL " ] || [ " $return_value " == " UPGRADE_FORCED " ] || [ " $return_value " == " DOWNGRADE_FORCED " ]; then
997
+ if [ " $return_value " == " UPGRADE_SAME " ] || [ " $return_value " == " DOWNGRADE " ]; then
1002
998
return_value=" UPGRADE_APP"
1003
999
fi
1004
1000
Original file line number Diff line number Diff line change @@ -653,23 +653,18 @@ def app_upgrade(
653
653
manifest .get ("remote" , {}).get ("revision" , "?" ),
654
654
)
655
655
continue
656
- elif app_current_version > app_new_version :
657
- upgrade_type = "DOWNGRADE_FORCED"
656
+
657
+ if app_current_version > app_new_version :
658
+ upgrade_type = "DOWNGRADE"
658
659
elif app_current_version == app_new_version :
659
- upgrade_type = "UPGRADE_FORCED "
660
+ upgrade_type = "UPGRADE_SAME "
660
661
else :
661
- app_current_version_upstream , app_current_version_pkg = str (
662
- app_current_version
663
- ).split ("~ynh" )
664
- app_new_version_upstream , app_new_version_pkg = str (
665
- app_new_version
666
- ).split ("~ynh" )
662
+ app_current_version_upstream , _ = str (app_current_version ).split ("~ynh" )
663
+ app_new_version_upstream , _ = str (app_new_version ).split ("~ynh" )
667
664
if app_current_version_upstream == app_new_version_upstream :
668
665
upgrade_type = "UPGRADE_PACKAGE"
669
- elif app_current_version_pkg == app_new_version_pkg :
670
- upgrade_type = "UPGRADE_APP"
671
666
else :
672
- upgrade_type = "UPGRADE_FULL "
667
+ upgrade_type = "UPGRADE_APP "
673
668
674
669
# Check requirements
675
670
for name , passed , values , err in _check_manifest_requirements (
You can’t perform that action at this time.
0 commit comments