Differences between revisions 3 and 4
Revision 3 as of 2008-12-11 20:23:49
Size: 4418
Editor: 216
Revision 4 as of 2008-12-13 00:52:44
Size: 4671
Editor: 216
Deletions are marked like this. Additions are marked like this.
Line 33: Line 33:

Additionally, cruft remover will get a lot of usability improvements and three new plugins:
 * finding unpurged packages (suggested as cruft, but not marked for removal by default)
 * autoremovable packages according to apt
 * .dpkg-old/new files


This spec is about improvements to the cruft remover, most importantly sharing the quirks/anomalies fixup code between update-manager and cruft-remover.

Release Note



Update-manager performs a cruft cleanup on upgrade, curft-remover is able to do this anytime. Currently they do not share the same code. This duplication of code should be unified.


Both u-m and c-r need to perform two tasks:

  • identify and cleanup cruft (obsolete packages, auto-removable packages etc)
  • fix anomalies relative to a fresh install (missing relatime in /etc/fstab) and should share the code that performs those tasks.

There are some constrains in the release upgrader:

  • must not hard depend on external python libraries (other than the stuff in ubuntu-minimal)
  • must work on previous version/lts-version of the distro (intrepid,hardy)

The external dependencies can just be bundled inside the release upgrader so that is not a real problem (just something that makes it a bit more difficult). We should consider if we need some cruft/anomalies to be version specific (e.g. only if the current version in hardy). The release upgrades does that in a number of cases, but it could be argued that such checks are not required since a anomaly is a anomaly.

The cruft removal code in u-m needs to be able to be seeded with a blacklist (the list of packages obsolete before the upgrade and a explicit blacklist).

Additionally, cruft remover will get a lot of usability improvements and three new plugins:

  • finding unpurged packages (suggested as cruft, but not marked for removal by default)
  • autoremovable packages according to apt
  • .dpkg-old/new files


Overview: cruftremover has a PluginManager that finds plugins, and the plugins find "pieces of cruft". A piece of cruft might be a package that should be removed (for whatever reason), or a specific change to be made to some file (e.g., add relatime to fstab).

The cruftremover code has been explicitly designed to be used as a library, so it would make more sense to have update-manager use the cruftremover code than the other way around. Update-manager needs to look at problems to fix at several points in the upgrade process, and it should notice those problems only at the relevant points. To fix this, cruftremover's plugin framework should add a new concept, "condition": the plugin can require that the application has set a specific condition for it to be active, and if a condition is set, only plugins requiring that condition should be active.

plugin_manager.get_plugins() -> [bar_plugin]
plugin.manager.get_plugins(condition="orange") -> [foobar]

(Condition might be used by update-manager like this: "hardy_to_intrepid.post_dist_upgrade", "hardy.postupgrade", etc. cruftremover doesn't really care about the actual names, it just compares strings.)

update-manager and cruftremover would collaborate to develop the shared plugins, and could have plugins specific to themselves as well. update-manager will have stuff that won't make sense to run from cruftremover. The shared plugins can be stored with the cruftremover library code, and the plugins specific to either program with its own code, or they can all be stored in the same place, depending on what is the easiest workflow. The PluginManager can find plugins in any number of directories.

UI Changes

No UI changes needed.

Test/Demo Plan

It's important that we are able to test new features, and demonstrate them to users. Use this section to describe a short plan that anybody can follow that demonstrates the feature is working. This can then be used during testing, and to show off after release.

This need not be added or completed until the specification is nearing beta.

Unresolved issues

This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.

BoF agenda and discussion

Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.


FoundationsTeam/Specs/JauntyCruftRemover (last edited 2009-02-02 13:54:58 by cs78240155)