Feature #756

-p and -P options for portupgrade should be optional

Added by Tomoyuki Sakurai almost 5 years ago. Updated over 4 years ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:Luke Kanies % Done:

0%

Category:-
Target version:0.24.0
Affected Puppet version:0.25.4 Branch:
Keywords:
Votes: 0

Description

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 /

History

Updated by Luke Kanies almost 5 years ago

There was some discussion of this on the list recently, but I can’t find a link to it.

Are you sure Puppet will still work without these options? I would frankly love someone to take over maintenance of the FreeBSD providers, since I don’t use FreeBSD and don’t know much about it. If you’re willing to take over maintenance, then you can pick the commands to run and I’ll accept all of your patches in this area.

Updated by Tomoyuki Sakurai over 4 years ago

it will work without “-p -P”. With “-P -p”, puppet will always build from source, even if the is a pre-build package available and will not keep the compiled binaries but throw them away after installation.

Updated by Luke Kanies over 4 years ago

  • Status changed from 1 to Closed
  • 7 set to fixed

Applied in commit:9311bdde6283a00e0f32b41e8171fc75c976ed97.

Also available in: Atom PDF