Puppet: System Administration Automated

Support

Ticket #628 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

method latest in ports.rb cannot handle package name with '-'

Reported by: trombik Assigned to: luke
Priority: normal Milestone:
Component: library Version: 0.22.4
Severity: normal Keywords: FreeBSD ports
Cc: Triage Stage: Unreviewed
Attached Patches: None Complexity: Unknown

Description

expected result:

debug: package provider ports: Executing '/usr/sbin/pkg_info'
debug: package provider ports: Executing '/usr/local/sbin/portversion -v syslog-ng'
debug: Service[syslog-ng](provider=init): Executing 'ps -auxwww'
debug: Service[syslog-ng](provider=init): PID is 92439

actual result:

debug: package provider ports: Executing '/usr/local/sbin/portversion -v syslog-ng'
err: /Package[syslog-ng]: Failed to retrieve current state of resource: Could not get latest version: Could not match package info 'syslog-ng-1.6.12' at /usr/local/etc/puppet/manifests/classes/syslog_ng.pp:42
notice: //node2/syslog_ng/Service[syslog-ng]: Dependency package[syslog-ng] has 1 failures

possible fix would be:

--- ports.rb.orig       Wed May  9 17:12:39 2007
+++ ports.rb    Wed May  9 17:13:57 2007
@@ -47,7 +47,7 @@
         match = $2
         info = $3

-        unless pkgstuff =~ /^(\w+)-([0-9].+)$/
+        unless pkgstuff =~ /^(\S+)-([^-\s]+)$/
             raise Puppet::PackageError,
                 "Could not match package info '%s'" % pkgstuff
         end

Change History

05/09/07 11:17:44 changed by trombik

  • summary changed from method latest in ports.rb cannnot handle package name with '-' to method latest in ports.rb cannot handle package name with '-'.

06/18/07 21:56:36 changed by luke

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

Applied in [2614].