(#7986) Cleanup pkg provider #2
Switch from Puppet.warning to the warning classmethod. This is mostly
for testing purposes and changes messages produced by puppet slightly.
Instead of
warning: Failed to match 'pkg list' line foo
The user will now get
warning: Puppet::Type::Package::ProviderPkg: Failed to match 'pkg list' line foo