Skip to content

Commit 39e9fb1

Browse files
[dpkg] add uninstall_options feature
1 parent e7fcd86 commit 39e9fb1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/puppet/provider/package/dpkg.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
and not `apt`, you must specify the source of any packages you want
88
to manage."
99

10-
has_feature :holdable, :virtual_packages, :install_options
10+
has_feature :holdable, :virtual_packages, :install_options, :uninstall_options
1111
commands :dpkg => "/usr/bin/dpkg"
1212
commands :dpkg_deb => "/usr/bin/dpkg-deb"
1313
commands :dpkgquery => "/usr/bin/dpkg-query"
@@ -172,7 +172,11 @@ def query
172172
end
173173

174174
def uninstall
175-
dpkg "-r", @resource[:name]
175+
flags = "-r"
176+
if @resource[:uninstall_options]
177+
flags += @resource[:uninstall_options]
178+
end
179+
dpkg *flags, @resource[:name]
176180
end
177181

178182
def purge

0 commit comments

Comments
 (0)