[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.6-1-356-g5718585

James Turnbull james at lovedthanlost.net
Fri Jan 23 14:21:38 UTC 2009


The following commit has been merged in the master branch:
commit 0ca502593b199d577e44352d8bde476fb2cf2267
Author: James Turnbull <james at lovedthanlost.net>
Date:   Sun Nov 16 10:11:19 2008 +1100

    Fixed #1718 - Added preseed to apt uninstall and purge

diff --git a/CHANGELOG b/CHANGELOG
index d5fc31c..a859a04 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,6 @@
 0.24.x
+    Fixed #1718 - Added preseed to apt uninstall and purge
+
     Fixed #1739 - Added uninstall functionality to yum provider
 
     Fixed #1710 - Spurious output in test run
diff --git a/lib/puppet/provider/package/apt.rb b/lib/puppet/provider/package/apt.rb
index 8046512..a99ee4c 100755
--- a/lib/puppet/provider/package/apt.rb
+++ b/lib/puppet/provider/package/apt.rb
@@ -99,10 +99,16 @@ Puppet::Type.type(:package).provide :apt, :parent => :dpkg, :source => :dpkg do
     end
 
     def uninstall
+        if @resource[:responsefile]
+            self.run_preseed
+        end
         aptget "-y", "-q", :remove, @resource[:name]
     end
 
     def purge
+        if @resource[:responsefile]
+            self.run_preseed
+        end
         aptget '-y', '-q', :remove, '--purge', @resource[:name]
         # workaround a "bug" in apt, that already removed packages are not purged
         super

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list