GNOME Bugzilla – Bug 705596
Partition Information Dialog - let user copy warnings
Last modified: 2013-12-09 18:11:30 UTC
The user clicks Information. If there is a warning at bottom, he cannot copy it with his mouse.
Confirmed problem with GParted 0.16.1. The text under the "! Warning:" title cannot be selected and copied.
Renaming report title from: let user copy warnings to: Partition Information Dialog - let user copy warnings
Created attachment 257739 [details] [review] Make warnings selectable (v1) Hi Curtis, Here's the patch for this. This is one method I used to create 3 warning messages for a single partition to see how multiple messages are displayed and selectable. 1) Create 2 partitions of size 2GB formatted as LVM2 PV. 2) Create VG spanning those 2 partitions: lvm vgcreate testvg /dev/sda7 /dev/sda8 3) Manually resize one PV without resizing the partition: lvm pvresize --setphysicalvolumesize 1G /dev/sda7 [1st message: unallocated space] 4) Export the VG: lvm vgexport testvg [2nd message: PV belongs to exported VG] 5) Maunally wipe second PV: wipefs /dev/sda8 wipefs -a /dev/sda8 [3rd message: one or more PVs is missing] Thanks, Mike
Created attachment 257765 [details] GParted Information Dialog with libarted message and GParted Message Hi Mike, Thanks for developing this patch, and for providing a set of test steps. Using the steps I can see the messages, each separated by a blank line. However if the message originates from an external tool, such as libparted (e.g., "The device /dev/sdc1 doesn't exist" [1]), then these messages usually end with a final new line character. In these circumstances, two blank lines separate different messages. I thought about adding logic to check for trailing new line characters, but even that would not work in all cases because the external tool messages might also include blank lines. The more I think about it, the more I think your current patch is likely the best compromise, and involves less complexity. What do you think? If you agree, I will commit the patch from comment #3 as is. Curtis [1] This particular message arises because I have a MIRROR FAKE RAID and hence individual disk devices in the RAID do not have corresponding partition path names (sdb and sdc in the RAID, so no sdb1 or sdc1). Only the FAKE RAID partition path name exists. E.g., /dev/mapper/isw_efjbbijhh_Vol0p1
Created attachment 257782 [details] [review] Make warnings selectable (v2) Hi Curtis, Here's version 2 of the patch. Updates code and comments to make the the trailing new line at the end of each message optional. This is another test case I used to create multiple error messages from an external command with trailing new lines and a GParted internal message from which I removed a blank line. 1) Create a test xfs file system. 2) Move /usr/sbin/xfs_db to /usr/sbin/xfs_db.exe. 3) Create executable /usr/sbin/xfs_db containing: #!/usr/bin/env python import sys import subprocess args = ['/usr/sbin/xfs_db.exe'] + sys.argv[1:-1] + ['/dev/ram0'] ret = subprocess.call(args) sys.exit(ret) Thanks, Mike
Thank you Mike for the updated patch and the new test. The code looks good to me and all of my testing has been successful. The patch in comment #5 has been committed to the git repository for inclusion in the next release of GParted. The relevant git commit can be viewed at the following link: Make Partition Information dialog warnings selectable (#705596) https://git.gnome.org/browse/gparted/commit/?id=98cd693818e22e4758074848759b547c8fef4997
This enhancement was included in the GParted 0.17.0 release on December 9, 2013.