puppetlabs/puppet — pull request #337 by kelseyhightower (2012-01-17 15:20:12+00:00)
Title: Ticket/2.7.x/11958 pip provider better error messages

Without this patch the pip package provider does not produce a user
friendly error message when the pip command is not available. The
current error message looks like this:

err: /Stage[main]/Dummy/Package[virtualenv]/ensure: change from
absent to present failed: Could not set 'present on ensure:
undefined method `pip' for
# at
/etc/puppet/modules/dummy/manifests/init.pp:5

This patch improves the error message by producing a resource error
which outputs the following:

err: /Stage[main]/Dummy/Package[virtualenv]: Provider pip is not
functional on this host

This patch also includes updated spec tests validating this change. No
other behavior changes are being introduced.