After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 688630 - Display user friendly error on medium analysis failures
Display user friendly error on medium analysis failures
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-11-19 10:38 UTC by Christophe Fergeau
Modified: 2016-03-31 13:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Display user friendly error on medium analysis failures (1.24 KB, patch)
2012-11-19 10:38 UTC, Christophe Fergeau
reviewed Details | Review
Display user friendly error on medium analysis failures (1.28 KB, patch)
2012-11-19 16:47 UTC, Christophe Fergeau
committed Details | Review

Description Christophe Fergeau 2012-11-19 10:38:37 UTC
When trying to install from a corrupted ISO (for example a 0-byte)
ISO, the error from libosinfo is displayed to the user, and these
are not user friendly messages. Replace it with a user-friendly
message, and only log the initial error to the console.
Comment 1 Christophe Fergeau 2012-11-19 10:38:39 UTC
Created attachment 229361 [details] [review]
Display user friendly error on medium analysis failures
Comment 2 Zeeshan Ali 2012-11-19 15:50:44 UTC
Review of attachment 229361 [details] [review]:

::: src/wizard.vala
@@ +290,3 @@
         } catch (GLib.Error error) {
+            debug("Failed to analyze installer image: %s", error.message);
+            App.app.notificationbar.display_error (_("Failed to analyze installer image"));

We dont know if its an 'image', it could be real media. Also I'm not sure we should expect user to know what an "image" is. s/image/media/. I'd also show the path to the media in the message so user can check whats wrong with it. Perhaps we should append with ". Corrupted or incomplete media?" to show that its not exactly our fault?

BTW, you want a '.' at the end. :)
Comment 3 Christophe Fergeau 2012-11-19 16:24:14 UTC
Review of attachment 229361 [details] [review]:

::: src/wizard.vala
@@ +290,3 @@
         } catch (GLib.Error error) {
+            debug("Failed to analyze installer image: %s", error.message);
+            App.app.notificationbar.display_error (_("Failed to analyze installer image"));

Are we going through this code path for actual media? I though we didn't have enough permissions to read the raw ISO data from a real CD and that we went through a different code path? ACK on the "corrupted" part, given that we don't show the path in the UI before, I'm not sure we should show it there.
Comment 4 Zeeshan Ali 2012-11-19 16:34:47 UTC
Review of attachment 229361 [details] [review]:

::: src/wizard.vala
@@ +290,3 @@
         } catch (GLib.Error error) {
+            debug("Failed to analyze installer image: %s", error.message);
+            App.app.notificationbar.display_error (_("Failed to analyze installer image"));

Now that you mention it, we don't but this will *most probably* change when remove the libosinfo udev rule (we'll only know then that its a bootable media and will have to scan it in app). Besides, I really prefer the term "media" over "image" here.
Comment 5 Christophe Fergeau 2012-11-19 16:47:17 UTC
Created attachment 229384 [details] [review]
Display user friendly error on medium analysis failures

When trying to install from a corrupted ISO (for example a 0-byte)
ISO, the error from libosinfo is displayed to the user, and these
are not user friendly messages. Replace it with a user-friendly
message, and only log the initial error to the console.
Comment 6 Zeeshan Ali 2012-11-19 20:01:35 UTC
Review of attachment 229384 [details] [review]:

ACK