summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/type/package.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/type/package.rb b/lib/puppet/type/package.rb
index 073336b20..8c9458372 100644
--- a/lib/puppet/type/package.rb
+++ b/lib/puppet/type/package.rb
@@ -133,13 +133,18 @@ module Puppet
@parent[:type]
)
end
+
+ # Because yum always exits with a 0 exit code, there's a retrieve
+ # in the "install" method. So, check the current state now,
+ # to compare against later.
+ current = self.is
begin
@parent.update
rescue => detail
self.fail "Could not update: %s" % detail
end
- if self.is == :absent
+ if current == :absent
return :package_created
else
return :package_changed