diff options
author | swills <swills@FreeBSD.org> | 2012-09-06 14:15:28 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2012-09-06 14:15:28 +0800 |
commit | 26fa377c02650cfd3f8ca18bec660ce7d82171ce (patch) | |
tree | 8690ad240756872442f98c4a362b55c9abc74d02 | |
parent | e6adf0b6cf163b5231fb40e4a7d49433f352d6b1 (diff) | |
download | freebsd-ports-gnome-26fa377c02650cfd3f8ca18bec660ce7d82171ce.tar.gz freebsd-ports-gnome-26fa377c02650cfd3f8ca18bec660ce7d82171ce.tar.zst freebsd-ports-gnome-26fa377c02650cfd3f8ca18bec660ce7d82171ce.zip |
- Fix issue with installing packages [1]
- Fix shell config issue [2]
PR: ports/169481 [1]
PR: ports/171188 [2]
Submitted by: romain [1]
Submitted by: Christopher McCoy <syseng@wayfair.com> [2]
-rw-r--r-- | sysutils/puppet/Makefile | 1 | ||||
-rw-r--r-- | sysutils/puppet/files/optpatch-package_origin | 29 | ||||
-rw-r--r-- | sysutils/puppet/files/patch-exec.rb | 17 |
3 files changed, 33 insertions, 14 deletions
diff --git a/sysutils/puppet/Makefile b/sysutils/puppet/Makefile index 84ae2a959a81..3d3f1a80c4cd 100644 --- a/sysutils/puppet/Makefile +++ b/sysutils/puppet/Makefile @@ -7,6 +7,7 @@ PORTNAME= puppet PORTVERSION= 2.7.19 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://downloads.puppetlabs.com/puppet/ diff --git a/sysutils/puppet/files/optpatch-package_origin b/sysutils/puppet/files/optpatch-package_origin index 3a5e3ad6c0a2..8e62b395e3fa 100644 --- a/sysutils/puppet/files/optpatch-package_origin +++ b/sysutils/puppet/files/optpatch-package_origin @@ -1,6 +1,9 @@ ---- 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 @@ + +$FreeBSD$ + +--- lib/puppet/provider/package/freebsd.rb.orig ++++ lib/puppet/provider/package/freebsd.rb +@@ -1,37 +1,163 @@ -Puppet::Type.type(:package).provide :freebsd, :parent => :openbsd do - desc "The specific form of package management on FreeBSD. This is an - extremely quirky packaging system, in that it freely mixes between @@ -16,14 +19,14 @@ - :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 @@ -96,14 +99,12 @@ + uri = source.merge "INDEX.bz2" + Puppet.debug "Fetching INDEX: #{uri.inspect}" + begin -+ open(uri, "r") do |f| -+ Bzip2::Reader.open(f.path) do |f| -+ while (line = f.gets) -+ fields = line.split("|") -+ pkg_info = self.class.parse_pkg_string(fields[0]) -+ origin = self.class.parse_origin(fields[1]) -+ @@ports_index[origin] = pkg_info -+ end ++ Bzip2::Reader.open(uri) do |f| ++ while (line = f.gets) ++ fields = line.split("|") ++ pkg_info = self.class.parse_pkg_string(fields[0]) ++ origin = self.class.parse_origin(fields[1]) ++ @@ports_index[origin] = pkg_info + end + end + rescue IOError, OpenURI::HTTPError, Net::FTPError @@ -188,7 +189,7 @@ end def query -@@ -44,6 +172,7 @@ +@@ -44,6 +170,7 @@ end def uninstall diff --git a/sysutils/puppet/files/patch-exec.rb b/sysutils/puppet/files/patch-exec.rb new file mode 100644 index 000000000000..ff9d28983d96 --- /dev/null +++ b/sysutils/puppet/files/patch-exec.rb @@ -0,0 +1,17 @@ +--- lib/puppet/provider/exec.rb.orig 2012-08-21 17:41:17.000000000 -0400 ++++ lib/puppet/provider/exec.rb 2012-08-30 12:31:32.000000000 -0400 +@@ -66,11 +66,9 @@ + end + + def extractexe(command) +- if command.is_a? Array +- command.first +- elsif match = /^"([^"]+)"|^'([^']+)'/.match(command) +- # extract whichever of the two sides matched the content. +- match[1] or match[2] ++ # easy case: command was quoted ++ if command =~ /^"([^"]+)"/ ++ $1 + else + command.split(/ /)[0] + end |