1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-30 01:15:52 +00:00

- Update to 2.7.6

This commit is contained in:
Steve Wills 2011-11-03 15:12:42 +00:00
parent 5a1afee1cd
commit a8cfef0835
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=284986
3 changed files with 17 additions and 20 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= puppet
PORTVERSION= 2.7.3
PORTVERSION= 2.7.6
CATEGORIES= sysutils
MASTER_SITES= http://downloads.puppetlabs.com/puppet/

View File

@ -1,2 +1,2 @@
SHA256 (puppet-2.7.3.tar.gz) = 39df9b1ffe06c1331f4eba6d21e632acffb7859e4f4b9e2faeddd9b8b685cb09
SIZE (puppet-2.7.3.tar.gz) = 1710562
SHA256 (puppet-2.7.6.tar.gz) = aad52b0c212f237578a7606a9d4052ed2bc85d9614589b12da55a7f2aca1bda4
SIZE (puppet-2.7.6.tar.gz) = 1737653

View File

@ -1,7 +1,5 @@
diff --git lib/puppet/provider/package/freebsd.rb lib/puppet/provider/package/freebsd.rb
index e10a20b..7f50e10 100755
--- lib/puppet/provider/package/freebsd.rb
+++ lib/puppet/provider/package/freebsd.rb
--- lib/puppet/provider/package/freebsd.rb.orig Thu Nov 3 10:58:56 2011
+++ lib/puppet/provider/package/freebsd.rb Thu Nov 3 10:59:02 2011
@@ -1,37 +1,165 @@
-Puppet::Type.type(:package).provide :freebsd, :parent => :openbsd do
- desc "The specific form of package management on FreeBSD. This is an
@ -18,22 +16,22 @@ index e10a20b..7f50e10 100755
- :pkgdelete => "/usr/sbin/pkg_delete"
+Puppet::Type.type(:package).provide :freebsd, :parent => Puppet::Provider::Package do
+ include Puppet::Util::Execution
+
+ desc "The specific form of package management on FreeBSD. Resource names must be
+ specified as the port origin: <port_category>/<port_name>."
+
+ commands :pkginfo => "/usr/sbin/pkg_info",
+ :pkgadd => "/usr/sbin/pkg_add",
+ :pkgdelete => "/usr/sbin/pkg_delete"
+
confine :operatingsystem => :freebsd
+ defaultfor :operatingsystem => :freebsd
+
+ @@lock = Mutex.new
+ @@ports_index = nil
- def self.listcmd
- command(:pkginfo)
+ @@lock = Mutex.new
+ @@ports_index = nil
+
+ # fix bug in URI::FTP merge method that tries to set typecode
+ # even when other is a string.
+ class URI::FTP
@ -54,7 +52,11 @@ index e10a20b..7f50e10 100755
+ :pkg_version => pkg_string.split("-")[-1],
+ }
+ end
+
- if @resource[:source] =~ /\/$/
- if @resource[:source] =~ /^(ftp|https?):/
- Puppet::Util::Execution::withenv :PACKAGESITE => @resource[:source] do
- pkgadd "-r", @resource[:name]
+ def self.unparse_pkg_info(pkg_info)
+ [:pkg_name, :pkg_version].map { |key| pkg_info[key] }.join("-")
+ end
@ -70,11 +72,7 @@ index e10a20b..7f50e10 100755
+ end
+ origin
+ end
- if @resource[:source] =~ /\/$/
- if @resource[:source] =~ /^(ftp|https?):/
- Puppet::Util::Execution::withenv :PACKAGESITE => @resource[:source] do
- pkgadd "-r", @resource[:name]
+
+ def self.instances
+ packages = []
+ output = pkginfo "-aoQ"
@ -190,7 +188,7 @@ index e10a20b..7f50e10 100755
end
def query
@@ -44,7 +172,7 @@ Puppet::Type.type(:package).provide :freebsd, :parent => :openbsd do
@@ -44,6 +172,7 @@
end
def uninstall
@ -199,4 +197,3 @@ index e10a20b..7f50e10 100755
+ output.split("\n").each { |pkg_name| pkgdelete([pkg_name]) }
end
end
-