Skip to content

Commit

Permalink
Update sfos-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Olf0 authored Apr 29, 2020
1 parent 6ba789b commit 20185fc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions usr/bin/sfos-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -398,19 +398,22 @@ else
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
echo "Please clean up or enlarge the root filesystem before retrying." >&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
echo "Please consider to abort and to clean up or enlarge the root filesystem before retrying." >&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
askyes >&2
echo >&2
elif ! [ "$free_space" -ge "1048576" ]
then # This 1 GiB limit to emit a soft low space notice is intended to trigger users early to do something about it.
echo "Notice: Less than 1 GiB ($free_space KiB) free space on the root filesystem!" >&2
echo "Please consider to clean up or enlarge the root filesystem." >&2
echo "Please consider to clean up or enlarge the root filesystem, 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 >&2
fi
fi
Expand Down

0 comments on commit 20185fc

Please sign in to comment.