Three small and simple changes that make ``reset()`` quite a bit faster (~3s on my testing VM). A lot more can/needs to be done in the future, but the rest is quite complicated.
--
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/401
Originally I didn't want to set any default because with storage, it's always a bug to rely on some default rounding. That's also why we always specify the rounding mode in *Blivet*.
As for the ``ROUND_HALF_UP`` I wasn't able to come up with an example of where it could be useful as using such value would always lead to issues. Even when showing to the user in the example above -- the user could tell themselves "Okay, I have 56 GiB of free space so I'm gonna create a 56GiB partition." which would fail. Thus the sizes should have been rounded up (used) and down (free) to prevent such issues.
So what I'm gonna do is:
* add ROUND_HALF_UP to rounding modes in *libbytesize*
* remove the default rounding mode in ``round_to_nearest()`` in *libbytesize*
* set the default rounding mode to ``ROUND_HALF_UP`` in ``round_to_nearest()`` in *Blivet* and add a warning to the docstring that relying on the default rounding mode is always a bug
--
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/399
My point was non-dirinstall case, sysroot == physical root.
For example live install - don't we need to call self.storage.write()?
(this may apply to tarinstall as well, for rpmostreepayload sysroot != physical root, for dnf storage is written early).
--
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/610