Skip to content

Commit

Permalink
Reestablish old free space limits ...
Browse files Browse the repository at this point in the history
... while retaining the new, three level structure (notify, warn, abort).
  
Background: 
As the largest SailfishOS upgrades (Jolla's estimates: the sum of the sizes of all updated RPMs (which are installed by default), when directly upgrading from the predecessor release) have been over 600 MiB (e.g., SFOS 3.3.0 -> 3.4.0), a ¾ GiB limit to warn explicitly seems to be reasonable.  
Note that the download sizes Jolla mentions in their release notes are only valid for upgrading from the direct predecessor release, but one may upgrade from one stop release to another, comprising the RPMs of multiple releases.  Furthermore these estimates from Jolla only cover their own default components (RPMs), individually installed RPMs (e.g., from the Jolla Store, OpenRepos or even Jolla's SailfishOS repositories) are not and cannot be accounted for.
  • Loading branch information
Olf0 authored Oct 4, 2020
1 parent 7cd9923 commit 94b8360
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions usr/bin/sfos-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -395,18 +395,18 @@ else
# OTOH, be aware that the download sizes Jolla mentions in their release notes are only valid for upgrading from the direct predecessor release,
# but one may upgrade from one stop release to another, comprising the RPMs of multiple releases.
# Furthermore these estimates from Jolla only cover their own default components (RPMs), individually installed RPMs (e.g., from the Jolla Store, OpenRepos or even Jolla's SailfishOS repositories) are not and cannot be accounted for.
if ! [ "$free_space" -gt "349525" ]
then # This hard GiB limit is an rough estimate of an upper boundary for the sum of all RPM size increases by an upgrade plus space for the package management's indexes, caches etc.
echo "Aborting: Less than GiB ($free_space KiB) free space on the root filesystem!" >&2
if ! [ "$free_space" -gt "524288" ]
then # This hard ½ GiB limit is an rough estimate of an upper boundary for the sum of all RPM size increases by an upgrade plus space for the package management's indexes, caches etc.
echo "Aborting: Less than ½ GiB ($free_space KiB) free space on the root filesystem!" >&2
echo "Please clean up or enlarge the root filesystem before retrying, see e.g.:" >&2
echo "https://together.jolla.com/question/222126/guide-installing-sailfish-x-on-xperias/#222126-33-increasing-the-root-lvm-volume-size" >&2
exit 1
elif ! [ "$free_space" -gt "699050" ]
then # As the largest SailfishOS upgrades (Jolla's estimates, in 2019 & 2020: the sum of all updated default RPMs sizes, when upgrading from the direct predecessor release) have been slightly under 500 MiB regularly, a ⅔ GiB limit to warn explicitly seems to be reasonable.
echo "Warning: Less than GiB ($free_space KiB) free space on the root filesystem!" >&2
elif ! [ "$free_space" -gt "786432" ]
then # As the largest SailfishOS upgrades (Jolla's estimates: the sum of the sizes of all updated RPMs (which are installed by default), when directly upgrading from the predecessor release) have been over 600 MiB (e.g., SFOS 3.3.0 -> 3.4.0), a ¾ GiB limit to warn explicitly seems to be reasonable.
echo "Warning: Less than ¾ GiB ($free_space KiB) free space on the root filesystem!" >&2
echo "Please consider to abort and to clean up or enlarge the root filesystem before retrying, see e.g.:" >&2
echo "https://together.jolla.com/question/222126/guide-installing-sailfish-x-on-xperias/#222126-33-increasing-the-root-lvm-volume-size" >&2
echo -n "Do you want to continue?" >&2
echo -n "Do you really want to continue?" >&2
askyes >&2
echo >&2
elif ! [ "$free_space" -ge "1048576" ]
Expand Down

1 comment on commit 94b8360

@Olf0
Copy link
Owner Author

@Olf0 Olf0 commented on 94b8360 Oct 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See commit-diff 3.7.2...3.7.3 for the original (establishing) change / commits.

Please sign in to comment.