Bug 331113 - Muon does not find available packages to install after fresh install
Summary: Muon does not find available packages to install after fresh install
Status: ASSIGNED
Alias: None
Product: muon
Classification: Applications
Component: muon (show other bugs)
Version: 2.1.3
Platform: Kubuntu Linux
: VLO minor
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-13 18:08 UTC by Rohan Garg
Modified: 2022-06-15 17:55 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rohan Garg 2014-02-13 18:08:56 UTC
After a fresh installation of Kubuntu 14.04, Muon Package Manager and Muon Software Installer don't find any of the available packages to install.


Reproducible: Always

Steps to Reproduce:
1) Do a fresh installation of Kubuntu 14.04
2) Open Muon Package Manager.
3) On the "Search" field, type the name of a package you know exists, (kopete, wine, kaffeine).

Actual Results:  
Muon gives you a blank list of packages.

Expected Results:  
Muon should gives you a list with packages related to your seach terms.

APT Xapian Index seems to be already up to date:

$ sudo update-apt-xapian-index
The index /var/lib/apt-xapian-index is up to date
Comment 1 Harald Sitter 2014-02-14 10:38:47 UTC
The xapian cache most certainly wasn't up-to-date when muon was started because only muon (respectively moun-notifier after IIRC 3 minutes) will trigger the initial update because the kubuntu installer doesn't do it.

So what I can reproduce is:
no cache -> muon -> updates cache -> when done muon's internal package list doesn't get updated apparently -> restart muon -> search works.
This mostly seems like a cache reloading problem that wouldn't be there if the kubuntu installer simply made sure to generate the xapian cache.
Comment 2 Harald Sitter 2014-02-14 10:58:12 UTC
QApt::Backend::Search
> if (d->xapianTimeStamp == 0 || !d->xapianDatabase) {

d->xapianDatabase is only set in in Backend::openXapianIndex, which will not set anything if there was no cache to begin with
> d->xapianDatabase = new Xapian::Database("/var/lib/apt-xapian-index/index");

consequently search always aborts because it has no database instance to work on. furthermore Backend::openXapianIndex is not called by any muon application after Backend::xapianUpdateFinished() was emitted, or more to the point all applications will try to open and if it fails, try to update, but then never try to open again.

the probably most appropriate and simple fix would be to have Backend::emitXapianUpdateFinished call Backend::openXapianIndex, so that a finished update always tries to open the cache, thus providing a d->xapianDatabae and enabling ::search to actually do anything.

we'll have to wait for Aleix to provide some input on that approach though.

all in all this issue has next to no impact as it only ever happens when there is absolutely no cache (i.e. directory missing), once a cache is present (even if a very old one) the database can be opened and search will work.

to reproduce run
>  sudo rm -rf /var/cache/apt-xapian-index
and start muon.
Comment 3 Aleix Pol 2015-01-15 15:40:04 UTC
I think that what Harald says makes sense. Can't do much without the xapian db anyway.
Comment 4 Justin Zobel 2021-03-10 00:10:58 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 5 Justin Zobel 2021-03-10 00:12:45 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.