diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-06-13 21:23:58 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-06-13 21:23:58 +0000 |
| commit | 1dfd55408d3a9f5c609ee562d0e948c15c5629fb (patch) | |
| tree | 617a1b21372c610b4ad3f79e7d7b89ae33bd1365 /lib | |
| parent | df340d6cd176f375df94e35ed2efc48b622348f2 (diff) | |
| download | puppet-1dfd55408d3a9f5c609ee562d0e948c15c5629fb.tar.gz puppet-1dfd55408d3a9f5c609ee562d0e948c15c5629fb.tar.xz puppet-1dfd55408d3a9f5c609ee562d0e948c15c5629fb.zip | |
Fixing packaging to deal with the fact that yum exits with 0 exit code even when it is told to install a non-existent package.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1263 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/type/package.rb | 7 |
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 |
