~ubuntubugs-aiki-it/computer-janitor/bug-726616

« back to all changes in this revision

Viewing changes to plugins/autoremoval_plugin.py

  • Committer: Bazaar Package Importer
  • Author(s): Barry Warsaw, Martin Pitt, Barry Warsaw
  • Date: 2011-02-16 15:58:36 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110216155836-gierzoufmyflfdcc
Tags: 2.1.0-0ubuntu1
[ Martin Pitt ]
* data/ComputerJanitor.ui: Drop obsolete has_separator properties.
* run_from_checkout.sh: Drop setting of $PYTHONPATH. Current directory is
  there by default anyway, and this breaks setting it from the environment.
* computerjanitorapp/gtk/*: Port from pygtk2 to pygi. Works fully with GTK3
  now, with GTK2 we need to disable the right-click popup menu
  (popup_for_device() is introspection safe, but only exists in GTK3.
  popup() isn't introspectable).
* computerjanitorapp/gtk/ui.py: Force GTK2 for now, as we do not yet have a
  GTK3 theme in Natty, and don't carry the GTK3 stack in the default
  install.
* debian/control: Update dependencies for the pygtk → pygi switch.
* debian/control: Drop obsolete system-cleaner conflicts and gksu
  dependency.

[ Barry Warsaw ]
* Add Edit menu items for selecting and deselecting cruft.
* Bump version number.
* Update copyright years.
* Python style, whitespace, and import cleanups.
* Print error messages via logger instead of stderr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# autoremoval_plugin.py - remove packages apt has marked as auto-removable
2
 
# Copyright (C) 2008  Canonical, Ltd.
 
2
#
 
3
# Copyright (C) 2008-2011  Canonical, Ltd.
3
4
#
4
5
# This program is free software: you can redistribute it and/or modify
5
6
# it under the terms of the GNU General Public License as published by
14
15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
16
 
16
17
 
17
 
import os
18
 
 
19
18
import computerjanitor
20
19
import computerjanitorapp
21
20
_ = computerjanitorapp.setup_gettext()
24
23
class AutoRemovablePlugin(computerjanitor.Plugin):
25
24
 
26
25
    """Plugin for finding packages apt says are removable.
27
 
    
 
26
 
28
27
    Automatically removable packages are those that apt installed because
29
28
    they were dependencies of something else, but which the user never
30
29
    asked for specifically, and which further are no longer used by
31
30
    anything, hopefully also not by the user.
32
 
    
 
31
 
33
32
    """
34
33
 
35
34
    description = _("Package was installed because another package "