puppetlabs/puppet — pull request #2318 by kylog (2014-01-31 19:29:28+00:00)
Title: (pup-1524) Correct resource_present? to account for purged

The fix for http://projects.puppetlabs.com/issues/23081 included
e376b9d8, which refactored some of the resource_harness code and
introduced ResourceApplicationContext.resource_present?

At the time that method only checked current_values[:ensure] against
:absent, which meant that if current_values[:ensure] was :purged,
then resource_present? was true and the code thus attempted to
sync additional properties. This resulted in the double events
noted in this ticket (the first one in manage_via_ensure_if_possible,
the second (unnecessary) one in sync_if_needed).

This change corrects the resource_present? logic so that it doesn't
treat :purged as present.