Personally, I prefer these options and both are enabled on most of my servers. However, some might prefer otherwise. These options can be enabled in pkgtools.conf by setting PORTUPGRADE_ARGS. But you cannot disable command line options by pkgtools.conf. Thus, hard-corded options do not allow user's preference.
In the case of -N and BATCH, these are critical to run puppet. It's reasonable to left them in the file.
--- lib/puppet/provider/package/ports.rb.orig Tue Aug 7 21:52:46 2007
+++ lib/puppet/provider/package/ports.rb Tue Aug 7 21:53:49 2007
@@ -17,11 +17,9 @@
end
def install
- # -p: create a package
# -N: install if the package is missing, otherwise upgrade
- # -P: prefer binary packages
# -M: yes, we're a batch, so don't ask any questions
- cmd = %w{-p -N -P -M BATCH=yes} << @resource[:name]
+ cmd = %w{-N -M BATCH=yes} << @resource[:name]
output = portupgrade(*cmd)
if output =~ /\*\* No such /