SparkyLinux Forums

Software & hardware support => Sparky applications => Topic started by: munair on January 17, 2021, 11:23:41 am

Title: [SOLVED] apt-xapian-index crash
Post by: munair on January 17, 2021, 11:23:41 am
While this is actually a Debian bug, I found this the best place on the forum to mention it.

With every Debian based system I install/use Synaptic and add the quick search box by installing and updating apt-xapian-index from the terminal:

Code: [Select]
$ sudo apt install apt-xapian-index
$ sudo update-apt-xapian-index -vf

However, xapian-index will not update (index) and ends with the message 'IndexError: list index out of range'. It does this every time. I checked the Debian bug list and it appears this bug was reported on 23 August 2019. Apparently it still exists.

I solved the problem by changing line 114 in relations.py (/usr/share/apt-xapian-index/plugins/relations.py):

old line:
Code: [Select]
doc.add_term(pfx + name.split(None, 1)[0])
new line:
Code: [Select]
doc.add_term(pfx + name.split(' ', 1)[0])
This bug affects at least SparkyLinux 5.13. It may take a while before Debian will solve this bug (if at all) so I present this solution here because I'm a SparkyLinux user and the community may benefit from it. It is not a great issue, but it is nasty for those like me who want the quick search box in Synaptic (which I believe should be in there by default. Just MHO.