ansible/library
martin f. krafft 420f7d7ac6 Introduce non-purged package status
A package may be removed but not purged with APT. The only way to
identify this state is by looking at the list of installed files of
a package. Even if the package has no files installed, this list will be
non-empty until the package is removed:

  # python -c "import apt; c=apt.Cache(); c.update(); c.open(); p=c['ruby1.8']; print p, p.installed, p.installed_files"
  <Package: name:'ruby1.8' id:1425> None [u'']

  # dpkg --purge ruby1.8
  (Reading database ... 27904 files and directories currently installed.)
  Removing ruby1.8 ...
  Purging configuration files for ruby1.8 ...

  # python -c "import apt; c=apt.Cache(); c.update(); c.open(); p=c['ruby1.8']; print p, p.installed, p.installed_files"
  <Package: name:'ruby1.8' id:1425> None []

See http://bugs.debian.org/712749 too.

If a package is not marked installed but it still 'has_files', then it
should be processed if the request is to purge it.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2013-06-19 10:00:33 +02:00
..
cloud Merge pull request #3236 from lwade/ec2_placementzone 2013-06-18 13:14:03 -07:00
commands Docs: consistently format playbook EXAMPLES 2013-06-17 08:53:46 +02:00
database Docs: consistently format playbook EXAMPLES 2013-06-17 08:53:46 +02:00
files Merge branch 'file_hard' of git://github.com/bcoca/ansible into devel 2013-06-18 20:31:05 -04:00
internal Allow modules to be categorized, and also sort them when generating the documentation. 2013-04-28 15:03:45 -04:00
inventory Docs: consistently format playbook EXAMPLES 2013-06-17 08:53:46 +02:00
messaging Docs: consistently format playbook EXAMPLES 2013-06-17 08:53:46 +02:00
monitoring Merge pull request #3219 from arturaz/devel 2013-06-18 17:31:52 -07:00
net_infrastructure DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition) 2013-06-15 20:54:25 +02:00
network Removed merge conflict header 2013-06-18 15:01:01 -06:00
notification Fixed a few small typos 2013-06-18 12:26:40 -06:00
packaging Introduce non-purged package status 2013-06-19 10:00:33 +02:00
source_control DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition) 2013-06-15 20:54:25 +02:00
system Merge pull request #3147 from toshywoshy/setup_mtab_without_bind 2013-06-18 17:56:49 -07:00
utilities Docs: consistently format playbook EXAMPLES 2013-06-17 08:53:46 +02:00
web_infrastructure adds 2 django commands (migrate, collectstatic) 2013-06-16 23:15:43 -04:00