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 690536 - Clean-up installer resources after installation is complete
Clean-up installer resources after installation is complete
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: installer
unspecified
Other All
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks: 688334
 
 
Reported: 2012-12-20 02:59 UTC by Zeeshan Ali
Modified: 2016-03-31 13:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
installer: Remove redundant error domain (901 bytes, patch)
2012-12-20 02:59 UTC, Zeeshan Ali
committed Details | Review
installer: Remove redundant get_preferred_language() argument (1.41 KB, patch)
2012-12-20 02:59 UTC, Zeeshan Ali
committed Details | Review
installer: Minor coding-style fixes (2.81 KB, patch)
2012-12-20 02:59 UTC, Zeeshan Ali
committed Details | Review
installer: UnattendedTextFile -> UnattendedScriptFile (1.93 KB, patch)
2012-12-20 02:59 UTC, Zeeshan Ali
committed Details | Review
installer: Move Unattended*File to separate module (12.39 KB, patch)
2012-12-20 02:59 UTC, Zeeshan Ali
committed Details | Review
installer: Don't lose pointers to unattended resources (5.80 KB, patch)
2012-12-20 02:59 UTC, Zeeshan Ali
committed Details | Review
installer: Remove unattended disk from config after install (3.24 KB, patch)
2012-12-20 02:59 UTC, Zeeshan Ali
committed Details | Review
installer: Remove CDROM from config after installation (2.93 KB, patch)
2012-12-20 02:59 UTC, Zeeshan Ali
committed Details | Review
installer: Clean-up resources after installation (3.92 KB, patch)
2012-12-20 02:59 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2012-12-20 02:59:17 UTC
Attaching patches to:

* Delete the unattended disk, kernel & initrd files after installation.
* Remove the unattended disk and CD-ROM from domain configuration after installation.
* Tidy-up the installer source code a bit.
Comment 1 Zeeshan Ali 2012-12-20 02:59:20 UTC
Created attachment 231945 [details] [review]
installer: Remove redundant error domain

This has been redundant since 2b22dfe but compiler didn't warn about it
since it was declared 'public'.
Comment 2 Zeeshan Ali 2012-12-20 02:59:23 UTC
Created attachment 231946 [details] [review]
installer: Remove redundant get_preferred_language() argument
Comment 3 Zeeshan Ali 2012-12-20 02:59:26 UTC
Created attachment 231947 [details] [review]
installer: Minor coding-style fixes

- Move private get_preferred_language() below public methods.
- Don't exceed 120 chars.
Comment 4 Zeeshan Ali 2012-12-20 02:59:29 UTC
Created attachment 231948 [details] [review]
installer: UnattendedTextFile -> UnattendedScriptFile

Rename to reflect the role of this class better after recent changes.
Comment 5 Zeeshan Ali 2012-12-20 02:59:32 UTC
Created attachment 231949 [details] [review]
installer: Move Unattended*File to separate module

Move UnattendedFile hierarchy to separate module.
Comment 6 Zeeshan Ali 2012-12-20 02:59:34 UTC
Created attachment 231950 [details] [review]
installer: Don't lose pointers to unattended resources

Don't lose pointers to unattended disk, kernel and initrd files on UI
exit.
Comment 7 Zeeshan Ali 2012-12-20 02:59:37 UTC
Created attachment 231951 [details] [review]
installer: Remove unattended disk from config after install

Remove unattended disk from domain configuration after installation is
complete.
Comment 8 Zeeshan Ali 2012-12-20 02:59:41 UTC
Created attachment 231952 [details] [review]
installer: Remove CDROM from config after installation

Remove CDROM disk from domain configuration after installation is
complete.
Comment 9 Zeeshan Ali 2012-12-20 02:59:43 UTC
Created attachment 231953 [details] [review]
installer: Clean-up resources after installation

This currently only applies to unattended installations and it means
deletion of unattended disk, kernel and initrd files.
Comment 10 Alexander Larsson 2012-12-21 08:13:08 UTC
Review of attachment 231945 [details] [review]:

ack
Comment 11 Alexander Larsson 2012-12-21 08:14:32 UTC
Review of attachment 231946 [details] [review]:

ack
Comment 12 Alexander Larsson 2012-12-21 08:15:09 UTC
Review of attachment 231947 [details] [review]:

ack
Comment 13 Alexander Larsson 2012-12-21 08:15:49 UTC
Review of attachment 231948 [details] [review]:

ack
Comment 14 Alexander Larsson 2012-12-21 08:16:36 UTC
Review of attachment 231949 [details] [review]:

ack
Comment 15 Alexander Larsson 2012-12-21 08:35:40 UTC
Review of attachment 231950 [details] [review]:

ack
Comment 16 Alexander Larsson 2012-12-21 08:38:30 UTC
Review of attachment 231951 [details] [review]:

What changed and made "some OSs need express install data after (e.g during first-boot setup)" not true anymore?
Or am i missing something?
Comment 17 Alexander Larsson 2012-12-21 08:41:42 UTC
Review of attachment 231952 [details] [review]:

ack
Comment 18 Alexander Larsson 2012-12-21 08:43:05 UTC
Review of attachment 231953 [details] [review]:

ack
Comment 19 Zeeshan Ali 2012-12-21 13:59:42 UTC
Review of attachment 231951 [details] [review]:

Oh, I only noticed that with Fedora in the past but I have tested these patches against Fedora18 so at least >=F18 doesn't break with this. Its very much possible that it was something wrong in the script that Fedora didn't accept and greeted user with first-boot setup. I'll now test these changes against F17 to be sure..
Comment 20 Zeeshan Ali 2012-12-21 14:33:03 UTC
(In reply to comment #19)
> Review of attachment 231951 [details] [review]:
> 
> Oh, I only noticed that with Fedora in the past but I have tested these patches
> against Fedora18 so at least >=F18 doesn't break with this. Its very much
> possible that it was something wrong in the script that Fedora didn't accept
> and greeted user with first-boot setup. I'll now test these changes against F17
> to be sure..

I just did a successful F17 install with these patches. Now trying XP just to be sure.
Comment 21 Alexander Larsson 2012-12-21 14:52:00 UTC
If that works, ack for that patch too.
Comment 22 Zeeshan Ali 2012-12-21 16:08:58 UTC
(In reply to comment #21)
> If that works, ack for that patch too.

Yup, XP installed fine too.
Comment 23 Zeeshan Ali 2012-12-21 16:11:05 UTC
Attachment 231945 [details] pushed as fc68530 - installer: Remove redundant error domain
Attachment 231946 [details] pushed as 3f0d677 - installer: Remove redundant get_preferred_language() argument
Attachment 231947 [details] pushed as 1588acc - installer: Minor coding-style fixes
Attachment 231948 [details] pushed as d211632 - installer: UnattendedTextFile -> UnattendedScriptFile
Attachment 231949 [details] pushed as ab2d3a2 - installer: Move Unattended*File to separate module
Attachment 231950 [details] pushed as 446be20 - installer: Don't lose pointers to unattended resources
Attachment 231951 [details] pushed as 1f32090 - installer: Remove unattended disk from config after install
Attachment 231952 [details] pushed as e52fcad - installer: Remove CDROM from config after installation
Attachment 231953 [details] pushed as 4e1c605 - installer: Clean-up resources after installation
Comment 24 Christophe Fergeau 2012-12-27 14:43:02 UTC
Review of attachment 231952 [details] [review]:

::: src/installer-media.vala
@@ +136,3 @@
+        }
+
+        domain.set_devices (devices);

This removes the CDROM device from the libvirt config, while what we want is to eject the CDROM image from the CDROM device but keep this device. This breaks 'f34ce3b Add support for changing the CDROM iso'
Comment 25 Zeeshan Ali 2012-12-27 14:57:20 UTC
(In reply to comment #24)
> Review of attachment 231952 [details] [review]:
> 
> ::: src/installer-media.vala
> @@ +136,3 @@
> +        }
> +
> +        domain.set_devices (devices);
> 
> This removes the CDROM device from the libvirt config, while what we want is to
> eject the CDROM image from the CDROM device but keep this device. This breaks
> 'f34ce3b Add support for changing the CDROM iso'

Although it was patches in this bug that introduced this issue, the new problem is not really this bug (i-e we do now clean the resources after installation) so please open another bug for it.