New review comment by tornaria on void-packages repository https://github.com/void-linux/void-packages/pull/29780#discussion_r703026578 Comment: > BTW, there's another bug wrt bootorder: if the bootorder list has an empty slot, saving the order and then restoring like this script will change the entries after the empty slot. Sorry, my explanation is a mess. What happens is: - say kernel is on entry 0005, which is the first in bootorder - now install a new version of the kernel - script removes entry for this kernel (0005) - script adds entry for the new version of the kernel Result: if 0000-0004 are occupied then the new kernel will be 0005, but if one of 0000-0004 is empty, new kernel will go to the empty slot and 0005 will be empty. Then the bootorder is screwed. The better way to do it would be: - script checks if there's an entry for the kernel it's replacing - if it is, it removes this old entry, and uses the same number for the new entry