update-apt-xapian-index-dbus fails because of wrong import

Bug #1579834 reported by Carlo Vanini
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
apt-xapian-index (Ubuntu)
Fix Released
Medium
Brian Murray
Xenial
Fix Released
Medium
Brian Murray

Bug Description

[Test Case]
1) run /usr/share/apt-xapian-index/update-apt-xapian-index-dbus
2) Observe it terminate with an error and does not update the index
   "Failed to import 'No module named 'glib'', can not use dbus"

With the version from proposed it should not exit with this error.

[Expected result]
1) sudo rm -rf /var/lib/apt-xapian-index/
2) make sure no other instance of update-apt-xapian-index-dbus is running
3) run sudo /usr/share/apt-xapian-index/update-apt-xapian-index-dbus
4) leave u-axi-dbus running, and run kcmshell5 kcm_driver_manager
5) u-axi-dbus produces no output (instead of the failure message), and after some time /var/lib/apt-xapian-index/ is created and populated again and the driver manager shows suggested packages instead of "collecting information" (see also bug #1530523)

[Regression Potential]
It doesn't work at all, so this'll be an improvement.

-----------------------------------------------------------------

Mai 09 15:42:10 bear dbus[1017]: [system] Activating service name='org.debian.AptXapianIndex' (using servicehelper)
Mai 09 15:42:10 bear org.debian.AptXapianIndex[1017]: Failed to import 'No module named 'glib'', can not use dbus
Mai 09 15:42:11 bear dbus[1017]: [system] Activated service 'org.debian.AptXapianIndex' failed: Launch helper exited with unknown return code 1

The correct import should be:

    from gi.repository import GLib as glib
    from gi.repository import GObject as gobject

ProblemType: BugDistroRelease: Ubuntu 16.04
Package: apt-xapian-index 0.47ubuntu8 [modified: usr/share/apt-xapian-index/update-apt-xapian-index-dbus]
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: KDE
Date: Mon May 9 17:52:17 2016
InstallationDate: Installed on 2015-05-04 (370 days ago)
InstallationMedia: Kubuntu 15.04 "Vivid Vervet" - Beta amd64 (20150326)
PackageArchitecture: allSourcePackage: apt-xapian-index
UpgradeStatus: Upgraded to xenial on 2016-05-04 (4 days ago)

Revision history for this message
Carlo Vanini (silhusk) wrote :
Revision history for this message
TFrog (stgparris) wrote :

I too suffered this exact same issue that Carlo Vanini lists here. It was my work with him and another developer of muon package manager that helped him find this issue. Between three of us we were able to narrow the issue in muon down to this issue. This issue occurred with me when I ran Kubuntu 16.04 LTS in VirtualBox as well as on bare metal. My system is a Dell Inspiron N5010 laptop with 8G of ram, 640G hard drive, Intel i5 M460 processor, and Broadcom wireless. I used both muon and synaptic in 16.04 LTS to check this issue. The only place I found the issue was within muon. Synaptic did NOT have the search issues that muon did. I do hope this issue gets resolved as I prefer muon as it's a native KDE application and has some features that synaptic does not have (like being able to remove unnecessary packages without resorting to the CLI).

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

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

Changed in apt-xapian-index (Ubuntu):
status: New → Confirmed
Revision history for this message
Carlo Vanini (silhusk) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix import of glib" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Francesc Vicent (fransex) wrote :

Thanks for the patch Carlo,

According to my system gobject should be also fixed:

AttributeError: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https://bugzilla.gnome.org/show_bug.cgi?id=709183

So I converted it too:

- import gobject
+ try:
+ from gi.repository import GObject as gobject
+ except ImportError:
+ import gobject

Changed in apt-xapian-index (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Carlo Vanini (silhusk) wrote :

Updated the patch to also fix the GObject import. Thanks Francesc for noticing that it was missing.

Revision history for this message
Carlo Vanini (silhusk) wrote :

Debdiff fixing the two wrong imports.

no longer affects: apt-xapian-index (Ubuntu Trusty)
Changed in apt-xapian-index (Ubuntu Xenial):
status: New → Triaged
Changed in apt-xapian-index (Ubuntu):
status: Confirmed → Triaged
Changed in apt-xapian-index (Ubuntu Xenial):
importance: Undecided → Medium
Changed in apt-xapian-index (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
Changed in apt-xapian-index (Ubuntu Xenial):
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Brian Murray (brian-murray) wrote :

I've uploaded the changes as 0.47ubuntu9 to the development release of Ubuntu - yakkety. I used the same debdiff but with version 0.47ubuntu8.1 and uploaded that for Xenial, to the queue for review by the SRU team. Thanks for working on this!

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

This bug was fixed in the package apt-xapian-index - 0.47ubuntu9

---------------
apt-xapian-index (0.47ubuntu9) yakkety; urgency=medium

  * debian/patches/07_glib_import.patch: Fix the import of GLib and GObject.
    (LP: #1579834)

 -- Carlo Vanini <email address hidden> Fri, 22 Jul 2016 13:25:11 -0700

Changed in apt-xapian-index (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Sean Clarke (sean-clarke) wrote :

Is this going to be back ported to Xenial ?

Revision history for this message
Brian Murray (brian-murray) wrote :

@Sean Clarke - yes, that is what I said in comment #9.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Carlo, or anyone else affected,

Accepted apt-xapian-index into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apt-xapian-index/0.47ubuntu8.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in apt-xapian-index (Ubuntu Xenial):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Carlo Vanini (silhusk) wrote :

Hi Brian,

apt-xapian-index/0.47ubuntu8.1 does fix the bug described in this report, but exposes another one that still causes update-apt-xapian-index-dbus to fail. That is,

* string.split() was deprecated and has been removed from python3
* the subprocess stdout has to be opened as text, otherwise readline() returns bytes instead of text

I changed the existing 05_python3.patch to fix them, and attach an updated debdiff including these changes. (or would you like me to split them?)

Carlo Vanini (silhusk)
tags: added: verification-failed
removed: verification-needed
Carlo Vanini (silhusk)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote :

I've uploaded your changes to the Xenial proposed queue for review by the SRU team, but changed the version number to 0.47ubuntu8.2 since we'd already used 0.47ubuntu8.1.

Revision history for this message
Jonathan Riddell (jr) wrote :

Hello Carlo, or anyone else affected,

Accepted into xenial-proposed. The package will build now and be available in a few hours in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-failed
tags: added: verification-needed
Revision history for this message
Harald Sitter (apachelogger) wrote :

8.2 doesn't actually apply the relevant change properly as it simply changes string to line.

I uploaded 8.3 properly applying the change now.

Revision history for this message
Jonathan Riddell (jr) wrote :

Hello Horold, or anyone else affected,

Accepted into xenial-proposed. The package will build now and be available in a few hours in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Jonathan Riddell (jr) wrote :

Test: I ran kcmshell5 kcm_driver_manager and it stayed at Collecting Information indefinately.

I updated to apt-xapian-index_0.47ubuntu8.3, killed update-apt-xapian-index and run sudo /usr/share/apt-xapian-index/update-apt-xapian-index-dbus

now on running kcmshell5 kcm_driver_manager it shows Collecting Information label then gets replaced with the Intel Microcode driver suggestion. I can successfully install this driver.

Revision history for this message
Harald Sitter (apachelogger) wrote :

Also confirmed working with 0.47ubuntu8.3

- sudo rm -rf /var/lib/apt-xapian-index/
- sudo /usr/share/apt-xapian-index/update-apt-xapian-index-dbus
- qdbus --system org.debian.AptXapianIndex / org.debian.AptXapianIndex.update_async true true

correctly generates xapian index without dbus helper falling over dead.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Jonathan Riddell (jr) wrote :

Hello Carlo, or anyone else affected,

Accepted into xenial-proposed. The package will build now and be available in a few hours in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-done
tags: added: verification-needed
Changed in apt-xapian-index (Ubuntu Xenial):
status: Fix Committed → Fix Released
tags: added: verification-done
removed: verification-needed
Revision history for this message
Jonathan Riddell (jr) wrote :

Sorry I seem to have run the wrong script there. Right one run now and package in -updates.

Revision history for this message
Thorsten Rochelmeyer (thorsten-1) wrote :

Could it be that the patch has not yet reached those users that do not have the proposed-repository activated? I still only see "collecting information".

Revision history for this message
Flames_in_Paradise (ellisistfroh-deactivatedaccount) wrote :

@ thorsten-1

A good way to find out such is to look at Launchpad

https://launchpad.net/ubuntu/+source/apt-xapian-index

Any Release/Version is listed there – use the arrows to exand the view.

You can just simply countercheck your installation (via konsole/command-line):

dpkg-query -l *xapian*

or if you know already the exact package name:

dpkg-query -l apt-xapian-index

tags: added: kubuntu
Revision history for this message
Flames_in_Paradise (ellisistfroh-deactivatedaccount) wrote :

@ thotsten-1

And there is a big "but..."

Obviously there is a missing dependency (trying to shoot with Canons at the problem)

See bug #1643715 (bug-title: Muon not installed by default),
-> comment #6

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.