Merge lp://qastaging/~evfool/update-manager/changelogs into lp://qastaging/update-manager

Proposed by Robert Roth
Status: Merged
Merged at revision: 2228
Proposed branch: lp://qastaging/~evfool/update-manager/changelogs
Merge into: lp://qastaging/update-manager
Diff against target: 123 lines (+27/-11)
3 files modified
DistUpgrade/DistUpgradeViewGtk3.py (+1/-2)
UpdateManager/Core/MyCache.py (+24/-8)
debian/control (+2/-1)
To merge this branch: bzr merge lp://qastaging/~evfool/update-manager/changelogs
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Review via email: mp+74328@code.qastaging.launchpad.net

Description of the change

Implemented changelog and NEWS.Debian caching using httplib2. The httplib2 dependency is already pulled in anyway (ubuntu-desktop depends on software-center depends on python-lazr.restfulclient depends on python-httplib2).
So the branch does the following: when a changelog/news is downloaded, it caches it using httplib2's file-based cache in $XDG_CACHE_DIR/update-manager-core/changelogs (if $XDG_CACHE_DIR is set, else it will be $HOME/.cache, based on the XDG directories specification [1]), so it will be loaded much faster if it should be downloaded for other packages too. The changelog cache is cleared whenever the Check button is pressed (to avoid showing old changelogs for new packages) or Update-Manager is closed (to free up the disk space used for the people in need of disk space). Fixes bug #582432.
This speeds up update-manager when reading through the changelogs (usually there are many packages updatable from the same source package, so having the same changelog), and reduces internet usage.

[1] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Many thanks for this branch! I merged it with a tiny tweak that explains that httplib2 sets headers.status to 200 even if its a 304 not modified response in the http header (which confused me initially as I thought that we would have to handle both headers.status != 200 and != 304).

Thanks!
 Michael

review: Approve
Revision history for this message
Michael Vogt (mvo) wrote :

I need to re-check this with the release team. While ubuntu-desktop has python-httplib2 as part of its dependencies already the server and other derivatives do not have it. With this change httplib2 would be pulled into ubuntu-standard. Which should be fine, but at this point (after beta-1) I need to confirm first that its ok.

Revision history for this message
Michael Vogt (mvo) wrote :

I pushed the branch to:
lp:~mvo/update-manager/evfool-changelogs-httplib2
(with my small comment tweak).

Revision history for this message
Robert Roth (evfool) wrote :

Michael, what's the status with this? What did the release team say? I didn't see this merged.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: