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

Add 2 more 32MiB blocks to efi_img_sz (issue 2552) #2562

Merged
merged 3 commits into from Feb 1, 2021

Conversation

jsmeix
Copy link
Member

@jsmeix jsmeix commented Jan 29, 2021

  • Type: Bug Fix / Enhancement

  • Impact: Normal

  • Reference to related issue (URL):
    ./EFI/BOOT/grub.cfg': No space left on device #2552

  • How was this pull request tested?
    Not at all tested by me (I don't use EFI).

  • Brief description of the changes in this pull request:

Add 2 more 32MiB blocks to be on the safe side against inexplicaple failures like
"cp: error writing '/tmp/rear.XXX/tmp/efi_virt/./EFI/BOOT/elilo.conf': No space left on device"
where the above calculated $efi_img_sz is a bit too small in practice.

Add 2 more 32MiB blocks to be on the safe side against inexplicaple failures like
"cp: error writing '/tmp/rear.XXX/tmp/efi_virt/./EFI/BOOT/elilo.conf': No space left on device"
where the above calculated $efi_img_sz is a bit too small in practice
cf. #2552
@jsmeix jsmeix added enhancement Adaptions and new features minor bug An alternative or workaround exists labels Jan 29, 2021
@jsmeix jsmeix added this to the ReaR v2.7 milestone Jan 29, 2021
@jsmeix jsmeix requested review from gdha and gozora January 29, 2021 12:30
@jsmeix jsmeix self-assigned this Jan 29, 2021
Typo fix in comment.
Copy link
Member

@gozora gozora left a comment

Choose a reason for hiding this comment

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

Looks good!

Use simpler arithmetic evaluation code.
@jsmeix
Copy link
Member Author

jsmeix commented Jan 29, 2021

Always nice to see how one could make code even simpler:
d679029

RFC 1925 item 12 (excerpt):

perfection has been reached
not when there is nothing left to add,
but when there is nothing left to take away

https://tools.ietf.org/html/rfc1925

I wish you all a relaxed and recovering weekend!

@jsmeix
Copy link
Member Author

jsmeix commented Jan 29, 2021

I would like to wait until next week so that @abbbi has a chance to test it,
cf. #2552 (comment)

@jsmeix
Copy link
Member Author

jsmeix commented Jan 29, 2021

Interestingly (( var += 2 )) does not result an error if $var is no number

# foo=123 ; (( foo += 2 )) && echo "'$foo'" || echo fail
echo '125'

# foo=bar ; (( foo += 2 )) && echo "'$foo'" || echo fail
echo '2'

at least for me with GNU bash version 4.4.23 (on openSUSE Leap 15.2).

@jsmeix jsmeix merged commit 2c97fee into master Feb 1, 2021
@jsmeix jsmeix deleted the jsmeix-add-2-to-efi_img_sz branch February 1, 2021 14:55
@jsmeix
Copy link
Member Author

jsmeix commented Feb 1, 2021

@abbbi
thank you for testing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adaptions and new features fixed / solved / done minor bug An alternative or workaround exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants