Ubuntu

software-properties needs to automatically trigger a cache refresh after adding a repo

Reported by cshong on 2012-11-06
42
This bug affects 6 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Medium
Brian Murray
Precise
Medium
Brian Murray
Saucy
Medium
Brian Murray

Bug Description

------
Impact
------

The apt cache is not updated after modifying or adding sources in software-properties.

---------
Test Case
---------
1) Launch software-properties-gtk
2) Enable or disable a source in the Ubuntu Software tab (e.g. multiverse)
3) Click Close
4) With the package from proposed you should receive a dialog indicating that "The information about available software is out-of-date"

I reinstalled Ubuntu 12.04.1 LTS. After select the right server in "software sources", Ubuntu does not automatically update the apt cache. Without manually updating the apt cache, I cannot find some packages that I want to install.

Steps to reproduce this bug:
1. Reinstall Ubuntu or any of its derivatives.
2. Run the software center.
3. At the top, go to Edit -> Software Sources, select the server you want to use.
4. You will see nothing happened.
5. Try find the package "build-essential", or just any package you want to install.

If you cannot find the package, that means the software center either not updating the cache automatically or not updating the xapian apt search index or both.

Attached here with a screenshot.

Temporary workaround:
1. Select a server in "Software Sources" (as stated in step number 3 above), if you haven't do so. Then, close the "Software Sources" window.
2. Manually run the "sudo apt-get update" command.
3. Run the "sudo update-apt-xapian-index -f" command.

Then, you can find the package you want to install.
---
ApportVersion: 2.0.1-0ubuntu12
Architecture: i386DistroRelease: Ubuntu 12.04
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release i386 (20120817.3)
Package: software-center 5.2.5
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic-pae 3.2.24
Tags: precise running-unity
Uname: Linux 3.2.0-29-generic-pae i686
UnreportableReason: This is not an official Ubuntu package. Please remove any third party package and try again.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

cshong (cshong87) wrote :
tags: added: apport-collected precise running-unity
description: updated

apport information

apport information

Launchpad Janitor (janitor) wrote :

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

Changed in software-center (Ubuntu):
status: New → Confirmed
bitinerant (bitinerant) wrote :

This bug makes it very difficult to write easy-to-follow instructions for adding software in non-default repositories. What I think is needed is a GUI button or menu item in Ubuntu Software Center which does something similar to "sudo apt-get update && sudo update-apt-xapian-index -f".

Wadelius (wadelius) wrote :

This still happens in 13.04. It has been a problem in Ubuntu Software Center as far as I can remember.

cshong (cshong87) wrote :

I can confirm that this bug still exist in Ubuntu 13.04.

cshong (cshong87) wrote :

So, developers, please do something. When can I expect this bug to be fixed?

affects: software-center (Ubuntu) → software-properties (Ubuntu)
Changed in software-properties (Ubuntu):
importance: Undecided → Wishlist
summary: - Ubuntu Software Center does not update the cache and the xapian search
- index automatically, caused some packages cannot be found.
+ software-properties needs to automatically trigger a cache refresh after
+ adding a repo
Changed in software-properties (Ubuntu):
importance: Wishlist → Medium
Bruno Nova (brunonova) wrote :

Developers, look at the comment I added to Bug #782953 (I could paste it here too).
I may have found the problem.

Bruno Nova (brunonova) wrote :

I've commited a fix and proposed a merge.
I've tested it locally and it seems to work well (not extensive tests).
The fix also fixes Bug #782953 indirectly.

Changed in software-properties (Ubuntu):
status: Confirmed → In Progress
Bruno Nova (brunonova) on 2013-10-16
Changed in software-properties (Ubuntu):
status: In Progress → Fix Committed
Changed in software-properties (Ubuntu Saucy):
milestone: none → saucy-updates
description: updated
description: updated
Changed in software-properties (Ubuntu Saucy):
assignee: nobody → Brian Murray (brian-murray)

Hello cshong, or anyone else affected,

Accepted software-properties into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/software-properties/0.92.27.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!

tags: added: verification-needed
Brian Murray (brian-murray) wrote :

I installed software-properties-gtk version 0.92.27.1 from saucy-proposed and confirm that the cache is refreshed after making changes to which sources are used.

tags: added: verification-done
removed: verification-needed
Adam Conrad (adconrad) wrote :

Hello cshong, or anyone else affected,

Accepted software-properties into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/software-properties/0.92.28 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!

tags: removed: verification-done
tags: added: verification-needed

I installed today software-properties 0.92.28 and I can confirm that after changing any of the sources (disabling multiverse, changing mirror or adding PPA) I get a dialog stating that software sources need to be refreshed.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.92.28

---------------
software-properties (0.92.28) saucy; urgency=low

  [ Bruno Nova ]
  * Ensure package sources are refreshed after modification
    Fixes Bug LP: #1075537 (and, indirectly, Bug LP: #782953 it seems).

  [ Brian Murray ]
  * Restore the removal of a line feed from a source (LP: #1239893)

  [ Jean-Baptiste Lallement ]

  * debian/manpages/add-apt-repository.1: Documented options -m and -s of
    add-apt-repository (LP: #1229092)

  [ Sebastien Bacher ]
  * softwareproperties/gtk/SoftwarePropertiesGtk.py: don't use the
    gtk-logout-helper command, it has been deprecated and dropped from the
    indicator-session binary, use gnome-session instead (lp: #1241210)
 -- Sebastien Bacher <email address hidden> Mon, 21 Oct 2013 11:16:21 -0400

Changed in software-properties (Ubuntu):
status: Fix Committed → Fix Released
Changed in software-properties (Ubuntu Saucy):
status: Fix Committed → Fix Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Bruno Nova (brunonova) wrote :

This bug was fixed for Saucy (and future), but what about older releases (especially LTS)?
The fix is trivial. Could someone add the fix to the older releases, or tell me how to do it? (does this involve "sending" a commit (through a merge request) to the bazaar branch lp:ubuntu/precise-proposed/software-properties for Precise, for example?)

Brian Murray (brian-murray) wrote :

Yes, a merge proposal against ubuntu/precise-proposed/software-properties is the correct way to proceed. If you do submit one add me (brian-murray) as a reviewer and I'll ensure that it gets uploaded to Precise. Thanks!

Bruno Nova (brunonova) wrote :

Ok. Thank you! I'll start doing this now (first for Precise, then others).

Bruno Nova (brunonova) wrote :

Done. Proposed the fix for Precise, Quantal and Raring (I guess).

Changed in software-properties (Ubuntu Precise):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Brian Murray (brian-murray)
Brian Murray (brian-murray) wrote :

Thanks for adding merge proposals for Quantal and Raring, I'm not certain its worth the work (reviewing, approving and verifying) of creating Stable Release Updates for those two releases though.

Bruno Nova (brunonova) wrote :

Yes, you're probably right. The support for those (non-LTS) releases will be over soon.

Hello cshong, or anyone else affected,

Accepted software-properties into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/software-properties/0.82.7.7 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 software-properties (Ubuntu Precise):
status: In Progress → Fix Committed
tags: removed: verification-done
tags: added: verification-needed
katsu (yoko-katsu) wrote :

verify condition: ubuntu 12.04.3 in virtualbox

---------------------------------
Steps to reproduce this bug:
1. Run the Software Sources
2. select the server you want to use & select the software sources close button.
3. You will see nothing happened.
---------------------------------

enable precise-proposed & install software-properties-gtk package.

$ sudo apt-get install -t precise-proposed software-properties-gtk
upgrade software-properties-gtk 0.82.7.6 0.82.7.7

---------------------------------
verification case:
1. Run the Software Sources
2. select the server you want to use & select the software sources close button.
3. popup "The information about available software is out-of-date" window
   (select the reload button -> repository cache updated)
---------------------------------

good works & thank you.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.82.7.7

---------------
software-properties (0.82.7.7) precise-proposed; urgency=low

  * Ensure package sources are refreshed after modification. Thanks to
    Bruno Nova for the patch. (LP: #1075537)
 -- Brian Murray <email address hidden> Fri, 06 Dec 2013 15:46:28 -0800

Changed in software-properties (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers