From owner-svn-ports-all@FreeBSD.ORG Thu Sep 6 06:15:28 2012 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC496106566C; Thu, 6 Sep 2012 06:15:28 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7B698FC0C; Thu, 6 Sep 2012 06:15:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q866FSEK072059; Thu, 6 Sep 2012 06:15:28 GMT (envelope-from swills@svn.freebsd.org) Received: (from swills@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q866FS6o072055; Thu, 6 Sep 2012 06:15:28 GMT (envelope-from swills@svn.freebsd.org) Message-Id: <201209060615.q866FS6o072055@svn.freebsd.org> From: Steve Wills Date: Thu, 6 Sep 2012 06:15:28 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r303746 - in head/sysutils/puppet: . files X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2012 06:15:29 -0000 Author: swills Date: Thu Sep 6 06:15:28 2012 New Revision: 303746 URL: http://svn.freebsd.org/changeset/ports/303746 Log: - 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 [2] Added: head/sysutils/puppet/files/patch-exec.rb (contents, props changed) Modified: head/sysutils/puppet/Makefile (contents, props changed) head/sysutils/puppet/files/optpatch-package_origin (contents, props changed) Modified: head/sysutils/puppet/Makefile ============================================================================== --- head/sysutils/puppet/Makefile Thu Sep 6 06:12:30 2012 (r303745) +++ head/sysutils/puppet/Makefile Thu Sep 6 06:15:28 2012 (r303746) @@ -7,6 +7,7 @@ PORTNAME= puppet PORTVERSION= 2.7.19 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://downloads.puppetlabs.com/puppet/ Modified: head/sysutils/puppet/files/optpatch-package_origin ============================================================================== --- head/sysutils/puppet/files/optpatch-package_origin Thu Sep 6 06:12:30 2012 (r303745) +++ head/sysutils/puppet/files/optpatch-package_origin Thu Sep 6 06:15:28 2012 (r303746) @@ -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: /." + + 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 Added: head/sysutils/puppet/files/patch-exec.rb ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/puppet/files/patch-exec.rb Thu Sep 6 06:15:28 2012 (r303746) @@ -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