summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2005-07-22 17:43:07 +0000
committerLuke Kanies <luke@madstop.com>2005-07-22 17:43:07 +0000
commitffe318c051378ab3832d711e5f59df8d0358a1e2 (patch)
tree36eaa77e3426656ac5479a0ed06b2216904d2016 /lib
parent64b55c1cc9b0c4ec0c47912bad2633ba581c67d0 (diff)
downloadpuppet-ffe318c051378ab3832d711e5f59df8d0358a1e2.tar.gz
puppet-ffe318c051378ab3832d711e5f59df8d0358a1e2.tar.xz
puppet-ffe318c051378ab3832d711e5f59df8d0358a1e2.zip
fixing packaging to work with rpm, too
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@449 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/type/package.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/puppet/type/package.rb b/lib/puppet/type/package.rb
index 60254ef50..12e814d5c 100644
--- a/lib/puppet/type/package.rb
+++ b/lib/puppet/type/package.rb
@@ -15,7 +15,7 @@ module Puppet
unless @parent.class.listed
@parent.class.getpkglist
end
- debug "package install state is %s" % self.is
+ Puppet.debug "package install state is %s" % self.is
end
def sync
@@ -72,7 +72,7 @@ module Puppet
array = [array]
end
@@types = array
- debug "Types are %s" % array.join(" ")
+ Puppet.debug "Types are %s" % array.join(" ")
end
def Package.getpkglist
@@ -117,30 +117,30 @@ module Puppet
if object = Package[name]
states = {}
object.eachstate { |state|
- debug "Adding %s" % state.name.inspect
+ Puppet.debug "Adding %s" % state.name.inspect
states[state.name] = state
}
hash.each { |var,value|
if states.include?(var)
- debug "%s is a set state" % var.inspect
+ Puppet.debug "%s is a set state" % var.inspect
states[var].is = value
else
- debug "%s is not a set state" % var.inspect
+ Puppet.debug "%s is not a set state" % var.inspect
if object[var] and object[var] != value
Puppet.warning "Overriding %s => %s on %s with %s" %
[var,object[var],name,value]
end
- object.state(var).is = value
+ #object.state(var).is = value
# swap the values if we're a state
if states.include?(var)
- debug "Swapping %s because it's a state" % var
+ Puppet.debug "Swapping %s because it's a state" % var
states[var].is = value
states[var].should = nil
else
- debug "%s is not a state" % var.inspect
- debug "States are %s" % states.keys.collect { |st|
+ Puppet.debug "%s is not a state" % var.inspect
+ Puppet.debug "States are %s" % states.keys.collect { |st|
st.inspect
}.join(" ")
end
@@ -296,7 +296,7 @@ module Puppet
open("| rpm -q -a --qf '%{NAME} %{VERSION}\n'") { |process|
# our regex for matching dpkg output
regex = %r{^(\S+)\s+(\S+)}
- fields = [:name, :version]
+ fields = [:name, :install]
hash = {}
# now turn each returned line into a package object