Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/docs/archinstall
diff options
context:
space:
mode:
authorHugo Ankarloo <hugo@ilait.se>2021-09-20 21:46:56 +0200
committerHugo Ankarloo <hugo@ilait.se>2021-09-20 21:46:56 +0200
commit26244212cfe2d2ecbf7c791c811deb499e7a3bcf (patch)
treee4ca67d39672919f5bcf24b7c867fca072068ba7 /docs/archinstall
parent915ae88947a008a21006d2572e498ed0c134350c (diff)
Fix Bug: Cannot get partuuid from loop device
File: lib/disk.py When installing on a loopback device (a.k.a loop device), function Filesystem.partuuid_to_index() crashes with a JSON parsing error. REASON 1) For loop devices, the property BlockDevice.device returns the actual image file (back-file) of the loop device instead of the /dev/X device. 2) Function Filesystem.partuuid_to_index() executes `lsblk --json` against BlockDevice.device . 3) `lsblk` fails and prints the error "not a block device" to stderr. This causes the output to not be valid JSON. 4) Code crashes when JSON parser tries to parse the output. SOLUTION - Make sure property BlockDevice.device only returns a valid block device. - Create new function BlockDevice.device_or_backfile that mimics the present behaviour of BlockDevice.device. - Use BlockDevice.device_or_backfile in function BlockDevice.__repr__(). SOLUTION REASONING I can only see one reason behind BlockDevice.device returning the back-file of a loop device, and that is to show the back-file to the user (instead of /dev/X) when printing the string representation of a BlockDevice. All other parts of the code can use the /dev/X file just fine. And IMO it makes more sense that a property named `device` only returns devices, and not normal files.
Diffstat (limited to 'docs/archinstall')
0 files changed, 0 insertions, 0 deletions