apt-check is slow because it disables pkgcache and srcpkgcache

Bug #1233587 reported by Anders Kaseorg
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Fix Released
Medium
Brian Murray

Bug Description

In /usr/lib/update-notifier/apt-check:

    # force apt to build its caches in memory for now to make sure
    # that there is no race when the pkgcache file gets re-generated
    #apt_pkg.config.set("debug::pkgcachegen","1")
    apt_pkg.config.set("Dir::Cache::pkgcache","")
    apt_pkg.config.set("Dir::Cache::srcpkgcache","")

This causes apt-check to be way slower than it should be (9 seconds instead of 2.7 seconds). It was written in 2008, and the race condition that the comment refers to was fixed in 2010:

http://anonscm.debian.org/gitweb/?p=apt/apt.git;a=commitdiff;h=3010fb0e069d2fd4c7a6ade4559bfb659bf8f2fb
http://anonscm.debian.org/gitweb/?p=apt/apt.git;a=commitdiff;h=22041bd2864b8d0b401b45dde9eda4003a11fec4

So I think it’s time to remove this slow workaround.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: update-notifier-common 0.145
ProcVersionSignature: Ubuntu 3.11.0-9.16-generic 3.11.2
Uname: Linux 3.11.0-9-generic x86_64
NonfreeKernelModules: openafs
ApportVersion: 2.12.5-0ubuntu1
Architecture: amd64
Date: Tue Oct 1 05:54:39 2013
EcryptfsInUse: Yes
InstallationDate: Installed on 2010-12-05 (1031 days ago)
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20101202)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: update-notifier
UpgradeStatus: Upgraded to saucy on 2012-11-15 (319 days ago)

Related branches

Revision history for this message
Anders Kaseorg (andersk) wrote :
Changed in update-notifier (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in update-notifier (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 0.146

---------------
update-notifier (0.146) saucy; urgency=low

  [ Brian Murray ]
  * Speed up apt-check (LP: #1233587). Thanks to Anders Kaseorg for the
    patch.

  [ Sebastien Bacher ]
  * Update translations from launchpad
 -- Sebastien Bacher <email address hidden> Fri, 04 Oct 2013 10:56:19 +0200

Changed in update-notifier (Ubuntu):
status: Triaged → Fix Released
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.