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 726432 - Express installation fails if no avatar file is available
Express installation fails if no avatar file is available
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: installer
3.11.x
Other Linux
: Normal normal
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-03-15 20:04 UTC by Timm Bäder
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
installer: Don't try to copy non-existant avatar (2.14 KB, patch)
2014-03-15 20:04 UTC, Timm Bäder
needs-work Details | Review
installer: Don't try to copy non-existant avatar (941 bytes, patch)
2014-03-16 12:59 UTC, Timm Bäder
committed Details | Review

Description Timm Bäder 2014-03-15 20:04:27 UTC
Created attachment 272029 [details] [review]
installer: Don't try to copy non-existant avatar

If the user has no avatar set up and no ~/.face file exists, the 
current implementation still tries to copy the file, which causes
the express installation to fail to be prepared.

The attached patch fixes that by simply not adding the unattended file
if it does not exist.

Note that the patch only fixes this instance of the bug, but e.g. if
~/.face exists but is no valid image, the express installation preparation
will still fail.
Comment 1 Zeeshan Ali 2014-03-16 12:42:30 UTC
Review of attachment 272029 [details] [review]:

good otherwise

::: src/unattended-installer.vala
@@ +400,3 @@
         }
 
+        if (FileUtils.test (avatar_path, FileTest.EXISTS)) {

I think this is what fidecio was talking about on IRC. :) If you turn this into:

if (..)
  return;

You'll not have to change anything in the following lines and this patch would be as minimalistic as it can be and code will be a lot more readable too IMO.
Comment 2 Timm Bäder 2014-03-16 12:59:06 UTC
Created attachment 272056 [details] [review]
installer: Don't try to copy non-existant avatar

early-out version of the first patch.
Comment 3 Zeeshan Ali 2014-03-17 19:04:11 UTC
Review of attachment 272056 [details] [review]:

ack
Comment 4 Zeeshan Ali 2014-03-17 19:04:50 UTC
Attachment 272056 [details] pushed as 47d65b7 - installer: Don't try to copy non-existant avatar