Puppet: System Administration Automated

Support

Ticket #756 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

-p and -P options for portupgrade should be optional

Reported by: trombik Assigned to: luke
Priority: normal Milestone: misspiggy
Component: library Version: 0.23.1
Severity: normal Keywords: FreeBSD
Cc: Triage Stage: Ready for checkin
Attached Patches: None Complexity: Unknown

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 /

Change History

08/23/07 00:14:55 changed by luke

  • stage changed from Unreviewed to Needs more info.

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.

10/04/07 04:55:48 changed by trombik

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.

11/24/07 06:07:35 changed by luke

  • stage changed from Needs more info to Ready for checkin.
  • milestone set to misspiggy.

11/25/07 09:10:24 changed by luke

  • status changed from new to closed.
  • resolution set to fixed.

Applied in [9311bdde6283a00e0f32b41e8171fc75c976ed97].