summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-12-18 16:47:56 -0600
committerLuke Kanies <luke@madstop.com>2007-12-18 16:47:56 -0600
commit5252f02dba8ef35db77ecb2d9bf711c1fd0b0bb2 (patch)
tree49e1d8f62fb0d3e954ba2552b050ba9ae6fc5dfb
parent92b0ebc7b74a29b5b875fc104a3681a264d49f03 (diff)
parentc22a584cbc80f502af7ddcd493114cb9c01f9cb8 (diff)
downloadpuppet-5252f02dba8ef35db77ecb2d9bf711c1fd0b0bb2.tar.gz
puppet-5252f02dba8ef35db77ecb2d9bf711c1fd0b0bb2.tar.xz
puppet-5252f02dba8ef35db77ecb2d9bf711c1fd0b0bb2.zip
Merge branch '0.24.x' of ssh://reductivelabs.com/opt/rl/git/puppet into 0.24.x
-rw-r--r--conf/redhat/puppet.spec20
-rwxr-xr-xlib/puppet/provider/package/rpm.rb18
2 files changed, 31 insertions, 7 deletions
diff --git a/conf/redhat/puppet.spec b/conf/redhat/puppet.spec
index fe181f544..ce034163f 100644
--- a/conf/redhat/puppet.spec
+++ b/conf/redhat/puppet.spec
@@ -8,8 +8,8 @@
Summary: A network tool for managing many disparate systems
Name: puppet
Version: 0.24.0
-Release: 1%{?dist}
-License: GPL
+Release: 2%{?dist}
+License: GPLv2+
Group: System Environment/Base
URL: http://puppet.reductivelabs.com/
@@ -48,6 +48,15 @@ The server can also function as a certificate authority and file server.
for f in bin/* ; do
sed -i -e '1c#!/usr/bin/ruby' $f
done
+# Fix some rpmlint complaints
+for f in mac_dscl.pp mac_dscl_revert.pp \
+ mac_netinfo.pp mac_pkgdmg.pp ; do
+ sed -i -e'1d' examples/code/$f
+ chmod a-x examples/code/$f
+done
+
+find examples/ -type f -empty | xargs rm
+find examples/ -type f | xargs chmod a-x
%install
rm -rf %{buildroot}
@@ -148,6 +157,13 @@ fi
rm -rf %{buildroot}
%changelog
+* Mon Dec 17 2007 David Lutterkort <dlutter@redhat.com> - 0.24.0-2
+- Use updated upstream tarball that contains yumhelper.py
+
+* Fri Dec 14 2007 David Lutterkort <dlutter@redhat.com> - 0.24.0-1
+- Fixed license
+- Munge examples/ to make rpmlint happier
+
* Wed Aug 22 2007 David Lutterkort <dlutter@redhat.com> - 0.23.2-1
- New version
diff --git a/lib/puppet/provider/package/rpm.rb b/lib/puppet/provider/package/rpm.rb
index 4af299283..98ca1efa6 100755
--- a/lib/puppet/provider/package/rpm.rb
+++ b/lib/puppet/provider/package/rpm.rb
@@ -92,6 +92,19 @@ Puppet::Type.type(:package).provide :rpm, :source => :rpm, :parent => Puppet::Pr
end
def uninstall
+ query unless get(:arch)
+ nvr = "#{get(:name)}-#{get(:version)}-#{get(:release)}"
+ arch = ".#{get(:arch)}"
+ # If they specified an arch in the manifest, erase that Otherwise,
+ # erase the arch we got back from the query. If multiple arches are
+ # installed and only the package name is specified (without the
+ # arch), this will uninstall all of them on successive runs of the
+ # client, one after the other
+ if @resource[:name][-arch.size, arch.size] == arch
+ nvr += arch
+ else
+ nvr += ".#{get(:arch)}"
+ end
rpm "-e", nvr
end
@@ -99,11 +112,6 @@ Puppet::Type.type(:package).provide :rpm, :source => :rpm, :parent => Puppet::Pr
self.install
end
- def nvr
- query unless @nvr
- @nvr
- end
-
def self.nevra_to_hash(line)
line.chomp!
hash = {}