diff options
author | Luke Kanies <luke@madstop.com> | 2008-05-12 16:19:07 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-05-12 16:19:07 -0500 |
commit | 2ab75f66ed0a5d307aa9bb55856777d27b0b5348 (patch) | |
tree | 67bb1ab14b2d8aca5d37e64907545063b9b3eeab /lib | |
parent | 270c007672c9a0458f14189cff3ccf1ff6311963 (diff) | |
parent | ae842ea8214a846624f89711d34f7481d5a8d01a (diff) | |
download | puppet-2ab75f66ed0a5d307aa9bb55856777d27b0b5348.tar.gz puppet-2ab75f66ed0a5d307aa9bb55856777d27b0b5348.tar.xz puppet-2ab75f66ed0a5d307aa9bb55856777d27b0b5348.zip |
Merge commit 'turnbull/0.24.x' into 0.24.x
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/provider/package/urpmi.rb | 6 | ||||
-rw-r--r-- | lib/puppet/util/settings.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/provider/package/urpmi.rb b/lib/puppet/provider/package/urpmi.rb index 8adc62ab4..a95835284 100644 --- a/lib/puppet/provider/package/urpmi.rb +++ b/lib/puppet/provider/package/urpmi.rb @@ -1,6 +1,6 @@ Puppet::Type.type(:package).provide :urpmi, :parent => :rpm, :source => :rpm do desc "Support via ``urpmi``." - commands :urpmi => "urpmi", :rpm => "rpm" + commands :urpmi => "urpmi", :urpmq => "urpmq", :rpm => "rpm" if command('rpm') confine :true => begin @@ -41,9 +41,9 @@ Puppet::Type.type(:package).provide :urpmi, :parent => :rpm, :source => :rpm do # What's the latest package version available? def latest - output = urpmi "-S", :available, @resource[:name] + output = urpmq "-S", @resource[:name] - if output =~ /^#{@resource[:name]}\S+\s+(\S+)\s/ + if output =~ /^#{@resource[:name]}\s+:\s+.*\(\s+(\S+)\s+\)/ return $1 else # urpmi didn't find updates, pretend the current diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb index d27406d6d..0e6f91e48 100644 --- a/lib/puppet/util/settings.rb +++ b/lib/puppet/util/settings.rb @@ -122,7 +122,7 @@ class Puppet::Util::Settings if pval = self.value(varname) pval else - raise Puppet::DevError, "Could not find value for %s" % parent + raise Puppet::DevError, "Could not find value for %s" % value end end |