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 678933 - Unify deletion of machines a bit
Unify deletion of machines a bit
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-06-27 00:25 UTC by Zeeshan Ali
Modified: 2016-03-31 13:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Unify deletion of machines a bit (2.55 KB, patch)
2012-06-27 00:25 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2012-06-27 00:25:08 UTC
I'm pretty sure I tested the 'cancel at review page' many times so not sure why I'm getting ghost items in collection view now. Anyway, attaching a issue to this issue.
Comment 1 Zeeshan Ali 2012-06-27 00:25:21 UTC
Created attachment 217337 [details] [review]
Unify deletion of machines a bit

This fixes the regression of ghost item in collection view when VM
creation is canceled at the 'review' page.
Comment 2 Marc-Andre Lureau 2012-06-27 00:40:25 UTC
Ah, is that somehow a regression from 674209?
Comment 3 Zeeshan Ali 2012-06-27 02:26:43 UTC
(In reply to comment #2)
> Ah, is that somehow a regression from 674209?

Yeah, I think that combined with libvirt event issue cause I did test cancellation against those patches and there was no ghost VMs. Its also possible I did address this issue and then lost the fix in one of the several rebases..
Comment 4 Marc-Andre Lureau 2012-06-27 09:30:21 UTC
Review of attachment 217337 [details] [review]:

::: src/vm-creator.vala
@@ +124,2 @@
                 domain.disconnect (stopped_id);
+                App.app.delete_machine (machine);

no need for volume.delete() anymore?
Comment 5 Zeeshan Ali 2012-06-27 12:21:47 UTC
(In reply to comment #4)
> Review of attachment 217337 [details] [review]:
> 
> ::: src/vm-creator.vala
> @@ +124,2 @@
>                  domain.disconnect (stopped_id);
> +                App.app.delete_machine (machine);
> 
> no need for volume.delete() anymore?

app.delete_machine() calls machine.delete and that does volume.delete().
Comment 6 Marc-Andre Lureau 2012-06-27 16:40:56 UTC
(In reply to comment #5)

> app.delete_machine() calls machine.delete and that does volume.delete().

I fail to see how.. :(
Comment 7 Zeeshan Ali 2012-06-27 16:48:01 UTC
(In reply to comment #6)
> (In reply to comment #5)
> 
> > app.delete_machine() calls machine.delete and that does volume.delete().
> 
> I fail to see how.. :(

In this page:

src/app.vala:195
   public void delete_machine (Machine machine, bool by_user = true) {
        machine.delete (by_user);
        collection.remove_item (machine);
    }

And then:

http://git.gnome.org/browse/gnome-boxes/tree/src/libvirt-machine.vala#n377

Admitted that this 'by-user' is a bit confusing. Its more like 'we are doing this ourselves and not reacting to a domain deletion from another app'. Suggestion for better name?
Comment 8 Zeeshan Ali 2012-06-27 16:48:34 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > 
> > > app.delete_machine() calls machine.delete and that does volume.delete().
> > 
> > I fail to see how.. :(
> 
> In this page:

s/page/patch/ :)
Comment 9 Marc-Andre Lureau 2012-06-27 17:27:02 UTC
(In reply to comment #7)
> 
> http://git.gnome.org/browse/gnome-boxes/tree/src/libvirt-machine.vala#n377

ah correct, it would be worth a comment perhaps :)

thanks
Comment 10 Marc-Andre Lureau 2012-06-27 17:27:19 UTC
Review of attachment 217337 [details] [review]:

ack
Comment 11 Zeeshan Ali 2012-06-27 17:42:37 UTC
Attachment 217337 [details] pushed as e0cfff8 - Unify deletion of machines a bit