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 694872 - A few installer fixes/improvements
A few installer fixes/improvements
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: installer
unspecified
Other All
: Normal normal
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-02-28 14:53 UTC by Zeeshan Ali
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
installer: Remove redundant loop (5.70 KB, patch)
2013-02-28 14:53 UTC, Zeeshan Ali
committed Details | Review
installer: Clean-up supported devices related code (8.87 KB, patch)
2013-02-28 14:53 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2013-02-28 14:53:37 UTC
See attached patches.
Comment 1 Zeeshan Ali 2013-02-28 14:53:40 UTC
Created attachment 237602 [details] [review]
installer: Remove redundant loop

Once the drivers are setup, they are setup for all scripts that can use
them. There is no need to keep setting them up for every script.

Also if there is going to be multiple scripts in the desktop profile
supporting same type (pre- or post-installable) of drivers, Boxes will be
copying them multiple times. That is not a big issue in case of
pre-installable drivers but in case of post-installable drivers, the
mkisofs commandline we use to setup postinstallation drivers will fail.

This patch fixes that potential issue as well.
Comment 2 Zeeshan Ali 2013-02-28 14:53:43 UTC
Created attachment 237603 [details] [review]
installer: Clean-up supported devices related code

Maintain a single list for all supported devices, both for devices
supported by OS out of the box and ones added through additional drivers
by us.
Comment 3 Christophe Fergeau 2013-03-01 14:13:58 UTC
Review of attachment 237602 [details] [review]:

Not sure why we were looping like that... (the short log could probably be more expressive)
Comment 4 Zeeshan Ali 2013-03-01 14:27:43 UTC
Review of attachment 237602 [details] [review]:

Because I wrote bad code? :) Short log ideally needs to be under 50 chars so its hard to be expressive there while keeping that rule in mind. Suggestions welcome!
Comment 5 Christophe Fergeau 2013-03-01 14:40:42 UTC
Review of attachment 237602 [details] [review]:

It's no big deal, this was just a note in passing, not important here.  'remove loop' is not very useful, 'Don't setup drivers for every script' or any higher level description like that would be an improvement.
Comment 6 Christophe Fergeau 2013-03-01 14:53:16 UTC
Review of attachment 237603 [details] [review]:

This does not seem to change existing behaviour, so ACK. However, I'm not sure about the meaning of the devices listed under a <driver> node. Does this mean 'if you install this driver, then these devices will be available to your VM' or 'if your OS supports one of these devices, then you can use this driver for his device'?

if it means the former, then appending devices supported by the OS and devices supported by the drivers we are going to install make sense. If it means the latter, then we should not do the append.
I thought this meant the latter, which would make the appending wrong, but I haven't checked libosinfo to see if that's correct. Any idea?
Comment 7 Zeeshan Ali 2013-03-01 15:13:22 UTC
Review of attachment 237603 [details] [review]:

Well libosinfo doesn't say either of these. libosinfo is simply reporting the list of devices that the device driver in question is for. Based on that, we make a decision in Boxes whether we use a particular device or not. E.g virtio-block is not supported by windows out of the box and Boxes knows this from lack of this device in Os.devices list. Boxes sees that there is however a driver available for this device so it sets up that driver and decides to use virtio-block.

What I'm trying to say is that libosinfo's view to this is lower level than Boxes'.
Comment 8 Christophe Fergeau 2013-03-01 15:36:28 UTC
Review of attachment 237603 [details] [review]:

After looking at libosinfo, the semantics of the <driver> node seem to be  'if you install this driver, then these devices will be usable by your VM', so the former in my previous comment.
Comment 9 Zeeshan Ali 2013-03-01 15:55:05 UTC
Attachment 237602 [details] pushed as e893997 - installer: Remove redundant loop
Attachment 237603 [details] pushed as e69add6 - installer: Clean-up supported devices related code