gtksourceview4 dependency is missing in virt-manager eoan package

Bug #1840677 reported by RussianNeuroMancer
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
virt-manager (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Steps to recreate:
- start virt-manager
- in extra console tail on ~/.cache/virt-manager/virt-manager.log
- enable "Enable XML editing" in "Edit"->"preferences"
- Then try to create a guest (or edit one that you have)
=> You might wonder why no window is opening, but in the log you will see the reported traceback.

---

Attempt to open virtual machine in virt-manager installed on Kubuntu 19.10 cause following traceback:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/manager.py", line 489, in row_activated
    self.show_vm(_src)
  File "/usr/share/virt-manager/virtManager/manager.py", line 474, in show_vm
    vmmenu.VMActionUI.show(self, self.current_vm())
  File "/usr/share/virt-manager/virtManager/vmmenu.py", line 329, in show
    from .vmwindow import vmmVMWindow
  File "/usr/share/virt-manager/virtManager/vmwindow.py", line 15, in <module>
    from .details.details import vmmDetails
  File "/usr/share/virt-manager/virtManager/details/details.py", line 18, in <module>
    from ..addhardware import vmmAddHardware
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 23, in <module>
    from .device.fsdetails import vmmFSDetails
  File "/usr/share/virt-manager/virtManager/device/fsdetails.py", line 14, in <module>
    from ..storagebrowse import vmmStorageBrowser
  File "/usr/share/virt-manager/virtManager/storagebrowse.py", line 11, in <module>
    from .hoststorage import vmmHostStorage
  File "/usr/share/virt-manager/virtManager/hoststorage.py", line 17, in <module>
    from .createpool import vmmCreatePool
  File "/usr/share/virt-manager/virtManager/createpool.py", line 18, in <module>
    from .xmleditor import vmmXMLEditor
  File "/usr/share/virt-manager/virtManager/xmleditor.py", line 6, in <module>
    gi.require_version('GtkSource', '4')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace GtkSource not available

Installing gir1.2-gtksource-4 libgtksourceview-4-0 libgtksourceview-4-common solved this.

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in virt-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

On a 19.10 system without those packages:

root@e:~# apt-cache policy gir1.2-gtksource-4 libgtksourceview-4-0 libgtksourceview-4-common
gir1.2-gtksource-4:
  Installed: (none)
  Candidate: 4.3.1-2
  Version table:
     4.3.1-2 500
        500 http://archive.ubuntu.com/ubuntu eoan/main amd64 Packages
libgtksourceview-4-0:
  Installed: (none)
  Candidate: 4.3.1-2
  Version table:
     4.3.1-2 500
        500 http://archive.ubuntu.com/ubuntu eoan/main amd64 Packages
libgtksourceview-4-common:
  Installed: (none)
  Candidate: 4.3.1-2
  Version table:
     4.3.1-2 500
        500 http://archive.ubuntu.com/ubuntu eoan/main amd64 Packages

# dpkg -l '*gtksource*'
dpkg-query: no packages found matching *gtksource*

I couldn't break it, but I ran into different issues ... ?!

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

virt-manager has code like:
  6 gi.require_version('GtkSource', '4')
in /usr/share/virt-manager/virtManager/xmleditor.py
matching the reported stack trace.

So I'd assume the bug should trigger on xml edit?

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

$ git tag --contains 267f226134afb9dfef9091e3da5647441aebabbf
v2.2.1
[✓]─[paelzer@Keschdeichel ~/work/virt-manager/virt-manager-ubuntu-git]──[99971]──[08:25 Di Aug 20]──(detached*)*
$ git tag --contains 033e97021e6654c9859776dedd9cd0504973f1d6
v2.2.1

So all those are in 2.2.1 release which has a bunch of other fixes as well.
I'd not yet make it pull in gir1.2-gtksource-4 and co (even thou that would be an option).
Instead I'd think I'm gonna try to wrap up 2.2.1 as a while for Eoan.

Since I fail to recreate your issue exactly, maybe you can give it a try if/once I have a PPA with that.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I think we need either gir1.2-gtksource-3 or gir1.2-gtksource-4 the rest comes in as dependency.
Both will work after the update.

I'll have to ask the desktop Team which is preferred.

Actually this is pretty clear:

apt-cache policy gir1.2-gtksource-3.0 gir1.2-gtksource-4
gir1.2-gtksource-3.0:
  Installed: 3.24.11-1
  Candidate: 3.24.11-1
  Version table:
 *** 3.24.11-1 500
        500 http://archive.ubuntu.com/ubuntu eoan/universe amd64 Packages
        100 /var/lib/dpkg/status
gir1.2-gtksource-4:
  Installed: 4.3.1-2
  Candidate: 4.3.1-2
  Version table:
 *** 4.3.1-2 500
        500 http://archive.ubuntu.com/ubuntu eoan/main amd64 Packages
        100 /var/lib/dpkg/status

v4 is in main, so this is what I will take.
Even no more needed 2.2.1 still makes sense IMHO.

Changed in virt-manager (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Note: I'm not entirely sure why ${python3:Depends} didn't pick it up.
It does so for
virtManager/details/viewers.py:17: gi.require_version('SpiceClientGtk', '3.0')
  => gir1.2-spiceclientgtk-3.0
virtManager/details/serialcon.py:16: gi.require_version("Vte", "2.91")
  => gir1.2-vte-2.91
virtManager/details/viewers.py:14:gi.require_version('GtkVnc', '2.0')
  => gir1.2-gtk-vnc-2.0
virt-manager:61: gi.require_version('Gtk', '3.0')
  => gir1.2-gtk-3.0
virt-manager:16:gi.require_version('LibvirtGLib', '1.0')
  => gir1.2-libvirt-glib-1.0

Just not:
  gir1.2-gtksource-4

Ah no, there is another one
  gir1.2-libosinfo-1.0
back from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=796723

Ok, lets add the dependency at the same level - that seems the right place.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

There is a test PPA [1] available now and I'd highly appreciate if you could give this PPA a try.
If it resolves your issue that would be great and we'd just slip in before feature freeze which is on this weeks Thursday.

[1]: https://launchpad.net/~paelzer/+archive/ubuntu/merge-virt-manager-2.2.1-eoan

Changed in virt-manager (Ubuntu):
importance: Undecided → High
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Further question, did you have to set "Enable XML editing" in "Edit"->"preferences" to run into this particular bug?

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I was able to reproduce your issue now, added some details to the bug.
Thanks for your report, I think this is ready to upload as soon as one reviewed the MP.

Unfortunately I found another bug of a similar type that I need to resolve as well to make it work well in Eoan. See bug 1840754

description: updated
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The other bug was a big red herring, but to be entirely sure it would be great if you could update it on your system and give it a try.

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Sorry for the delay, I will try to check this today or Friday.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

NP - I'm fine since I got a way to test it myself.
It already is in https://launchpad.net/ubuntu/+source/virt-manager/1:2.2.1-0ubuntu1

Which should soon migrate to the release pocket unless the only remaining test (armhf) runs into an error.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virt-manager - 1:2.2.1-0ubuntu1

---------------
virt-manager (1:2.2.1-0ubuntu1) eoan; urgency=medium

  * Merge with new upstream release v2.2.1
    - d/control: add missing gir1.2-gtksource-4 dependency (LP: #1840677)

 -- Christian Ehrhardt <email address hidden> Tue, 20 Aug 2019 08:39:44 +0200

Changed in virt-manager (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

> Further question, did you have to set "Enable XML editing" in "Edit"->"preferences" to run into this particular bug?

No.

> but to be entirely sure it would be great if you could update it on your system and give it a try

I updated to virt-manager 2.2.1 and issue is no longer reproducible. Thank you for fixing this so fast :)

By any chance, maybe you know how this one https://bugs.launchpad.net/ubuntu/+source/virt-manager/+bug/1832395 can be fixed or at least workarounded?

Revision history for this message
Christian Ehrhardt  (paelzer) wrote : Re: [Bug 1840677] Re: gtksourceview4 dependency is missing in virt-manager eoan package

> By any chance, maybe you know how this one
> https://bugs.launchpad.net/ubuntu/+source/virt-manager/+bug/1832395 can
> be fixed or at least workarounded?

I have looked at it and was the one who asked Rafael to take a look as
he has experience and access to this kind of HW.
But currently everything is really busy, so this gets postponed every week.

No quick fix available there sorry, but hopefully still good to know
that I can confirm it still is on his list.

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

> No quick fix available there sorry, but hopefully still good to know
that I can confirm it still is on his list.

No problem, thank you for checking this.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.