Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bsc#910791 #231

Closed
wants to merge 2 commits into from
Closed

fixed bsc#910791 #231

wants to merge 2 commits into from

Conversation

dwaas
Copy link
Contributor

@dwaas dwaas commented Sep 24, 2016

COMMIT MESSAGE


warning message for too small disks was made more detailed to avoid
situations in which the rounding would actually cause a deliberately
false message.

e.g.
Inputting 11MiB and getting as a message:

"Your partition is too small to use ext3.
The minimum size for this file system is 10.00 MiB"

EXTRA COMMENTS

  1. tested on LEAP 42.1

  2. locally make check wasn't succeeding 100% likely because I only took the latest libstorage and yast-storage checkouts and use the rest from usual packages distributed in openSUSE Leap.

  3. the remote package build succeeds (osc build) with the following output:
    ...
    [ 65s] 3 packages and 0 specfiles checked; 0 errors, 8 warnings.

  4. Please DO note that the current fix leaks information through the abstractions. I'm looking forward to discuss better phrasing to this fix.

some ideas could be:

"The machine interpreted %s", size_k
etc...

@@ -293,13 +293,17 @@ def check_ok_fssize(size_k, volume)

if Ops.less_than(size_k, min_size_k)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

http://www.rubydoc.info/github/yast/yast-ruby-bindings/Yast%2FOps.less_than

Claims that I should use > instead of Ops.less_than.

Anyone can confirm this?

Copy link
Contributor

Choose a reason for hiding this comment

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

@dwaas Yes. All those Ops and Builtins methods are ugly leftovers from the autoconversion from YCP to Ruby that we will like to see dying.

They were introduced because YCP and Ruby operators had different behavior in 1% of situations, but every time we touch code we try to remove them in favor of standard Ruby. As said, in 99% of occasions it just means an straightforward substitution like the one you mentioned.

Popup.Warning(
Builtins.sformat(
_(
"Your partition is too small to use %1.\nThe minimum size for this file system is %2.\n"
"Your partition is too small to use %1.\n" +
"Your inputted size (after rounding up) is %2.\n" +
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not proper English. Please change this to

"The size you entered (after rounding up) is %2.\n"

@@ -293,13 +293,17 @@ def check_ok_fssize(size_k, volume)

if Ops.less_than(size_k, min_size_k)
# warning message, %1 is replaced by fs name (e.g. Ext3)
# %2 is prelaced by a size (e.g. 10 MB)
# %2 is replaced by the user inputted size (e.g. 20GB)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as below: Please change "inputted" to "entered".
Even if it's just a comment, it hurts the eyes. ;-)

@dwaas
Copy link
Contributor Author

dwaas commented Sep 26, 2016

Thanks for reviewing, Stefan and Ancor. Just pushed the fixes.

Tested them the same way and there seem to be no differences.

@shundhammer
Copy link
Contributor

The wording is okay now. Thanks!

-------------------------------------------------------------------
Sat Sep 24 14:47:48 UTC 2016 - dwaas@suse.com

- fix for bsc#910791
Copy link
Member

Choose a reason for hiding this comment

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

please be a bit more verbose about change you did. Something like Avoid confusion in small partition warning by displaying also rounded input value (bsc#910791) and add - 3.1.104 to next line like other entries.
Then please make it mergable and I will merge it.

@jreidinger
Copy link
Member

@dwaas there is still conflict in spec file, please also solve it.

warning message for too small disks was made clearer to avoid
situations where rounding would output something actually false.

e.g.
Entering 11MiB and getting as a message:

"Your partition is too small to use ext3.
The minimum size for this file system is 10.00 MiB"
the method is a remainder of YCP -> Ruby autoconversion
@dwaas
Copy link
Contributor Author

dwaas commented Nov 30, 2016

Conflicts resolved at #246

@dwaas dwaas closed this Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants