[chef] Re: Re: Package resource action :purge does nothing when package is not installed


Chronological Thread 
  • From: Cassiano Leal < >
  • To:
  • Subject: [chef] Re: Re: Package resource action :purge does nothing when package is not installed
  • Date: Tue, 5 Mar 2013 16:43:06 -0300

Looks like I should have searched for one before asking! :)

http://tickets.opscode.com/browse/CHEF-3419

- cassiano

On Tuesday, March 5, 2013 at 16:40, AJ Christensen wrote:

Sounds like a bug due to idempotency checking in the package provider!

I'd expect purge (although naturally, it is a dpkg provider action
technically) to purge all states that are able to be purged, including
dpkg 'c' state.

It looks like the way the apt and dpkg providers are written
(subclassed from Package base) they explicitly check if the package is
'being removed' before allowing a purge. You may be able to adjust
this method temporarily (with a monkey patch, or similar) in order to
affect some test resolution. [0]

Open a ticket up :)

--AJ


On 6 March 2013 08:33, Cassiano Leal < "> > wrote:
The subject says it all :)

I've got a recipe that purge a package, but I noticed that if the package is
not installed, :purge doesn't do anything, potentially leaving configuration
files behind.

In my specific use case, I have uninstalled the package manually, so I have
it in the "c" state on the apt system -- this is on Ubuntu 12.04. I would
have expected :purge to actually purge the package.

Is the current behaviour expected, is it a bug, or am I missing something?

Thanks!
- cassiano




Archive powered by MHonArc 2.6.16.

§