From: "Brian C. Lane" bcl@redhat.com
We use shlex.split to parse the cmdline. This mostly works, except that it removes any \ from the string instead of converting them back to \
This results in the device LABEL having x20 in it, which isn't matching the ID_FS_LABEL when looking for protected devices.
So, this replaces the \x20 with _ when parsing the cmdline, which also matches what ID_FS_LABEL expects. This results in the usb device being filtered from the available disks for the install. --- pyanaconda/flags.py | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py index 7a22c90..125db3a 100644 --- a/pyanaconda/flags.py +++ b/pyanaconda/flags.py @@ -143,6 +143,10 @@ class BootArgs(OrderedDict): if right.count('"') % 2: cmdline = left + middle + '"' + right
+ # shlex doesn't properly handle \ (it removes them) + # which scrambles the spaces used in labels so use underscores + cmdline = cmdline.replace("\x20", "_") + lst = shlex.split(cmdline)
for i in lst:
On Tue, 2013-06-18 at 16:36 -0700, Brian C. Lane wrote:
From: "Brian C. Lane" bcl@redhat.com
We use shlex.split to parse the cmdline. This mostly works, except that it removes any \ from the string instead of converting them back to \
This results in the device LABEL having x20 in it, which isn't matching the ID_FS_LABEL when looking for protected devices.
So, this replaces the \x20 with _ when parsing the cmdline, which also matches what ID_FS_LABEL expects. This results in the usb device being filtered from the available disks for the install.
Filthy, but still ACK. Crappy problems breed crappy solutions.
How long do you think it'll be before udev/blkid change that underscore business out from under us?
On Tue, Jun 18, 2013 at 06:55:39PM -0500, David Lehman wrote:
On Tue, 2013-06-18 at 16:36 -0700, Brian C. Lane wrote:
From: "Brian C. Lane" bcl@redhat.com
We use shlex.split to parse the cmdline. This mostly works, except that it removes any \ from the string instead of converting them back to \
This results in the device LABEL having x20 in it, which isn't matching the ID_FS_LABEL when looking for protected devices.
So, this replaces the \x20 with _ when parsing the cmdline, which also matches what ID_FS_LABEL expects. This results in the usb device being filtered from the available disks for the install.
Filthy, but still ACK. Crappy problems breed crappy solutions.
Yeah. I *am* fairly confident it won't break anything, since it wasn't working in the first place. So that's a plus :)
How long do you think it'll be before udev/blkid change that underscore business out from under us?
Yeah. Although they do also have a ID_FS_LABEL_ENC which has the \ still in it -- I was going to possibly switch to using that if shelx had been more cooperative.
anaconda-patches@lists.fedorahosted.org