GNOME Bugzilla – Bug 639176
Save partition layout to gparted_details.htm
Last modified: 2019-05-29 17:05:50 UTC
It will help a lot in debugging if gparted_details.htm log contained output of 'fdisk -l -u' before and after operation as well as output of 'parted /path-to-your-device unit s print'. For example, after I reported bug #638634 I've already made modifications to partitions and can't provide requested information from the time the error occurred.
The output from "fdisk -l -u" and "parted /device unit s print" is useful when debugging problems. It is not required in all situations, and is not needed when everything goes well. I think this might be useful when an error is encountered, so I would suggest that this bug report should apply to the situation where an error is encountered and hence to add the output from the above two commands to the gparted_details.htm log file.
To me it seems that the whole output of gparted_details.log is not needed when everything goes well, but it is indeed must be present in case of error.
Created attachment 374217 [details] [review] Save partition layout to gparted_details.htm (v1) Hi Curtis, Here's a patchset for this. It writes the starting device layout at the top of the saved gparted_details.htm file in an effort to reduce the number of times we have to ask users for 'fdisk -l', 'parted' and 'lsblk' output. I also ensured that the updated HTML is still valid according to the W3C Markup Validation Service: https://validator.w3.org/check The HTML markup for the newly written disk layouts is written one line per viewable line when rendered, where as the HTML markup is written one line per element. Look at the resultant HTML and see if it OK. Thanks, Mike
Since the code reports the GParted known device layout I am changing this bug's title from: Add output of 'fdisk ...' and 'parted ...' to gparted_details.htm log to this which better reflects what is implemented: Save partition layout to gparted_details.htm
Hi Mike, This patch set looks good to me. I like that it includes the information for all of the devices, not just the ones upon which operations were performed. If no concerns are raised then I plan to commit this patch set to the master branch in the next day or so. Curtis
Thank you Mike for this enhancement which should help with troubleshooting partitioning issues. Patch set (v1) has been committed to the git repository for inclusion in the next release of GParted. The relevant git commits can be viewed at the following links: Write starting device overview information to saved details (#639176) https://gitlab.gnome.org/GNOME/gparted/commit/edb3afac7bf9fdae444bb53bb906f231f61e8b76 Additionally write partition information to saved details (#639176) https://gitlab.gnome.org/GNOME/gparted/commit/f7790029722720b01ef6975cec74dce718ee7dd2 Rename method to Dialog_Progress::write_operation_details() https://gitlab.gnome.org/GNOME/gparted/commit/4ccee8063c471831a34889663aff117616e25c1d Use CSS to turn off table borders once in saved details HTML https://gitlab.gnome.org/GNOME/gparted/commit/63f578a94b778557d1999343359be5c8cfe57817 Rename for loop counter variables to normative 'i' in Dialog_Progress https://gitlab.gnome.org/GNOME/gparted/commit/22ce8a4c642c8401bdf67d2a45d18320c53d8e29 Rename Dialog_Progress member variable to m_curr_op https://gitlab.gnome.org/GNOME/gparted/commit/ea7bd0d419acfa0bd60c3f3d4bd9edca4972a5c8 Remove unnecessary #include from GParted_Core.cc https://gitlab.gnome.org/GNOME/gparted/commit/6ad107bc3b1efb62b34ffd2537c1434e3d1a9d2c
This enhancement was included in the GParted 1.0.0 release on May 29, 2019.