Issue #17807 has been updated by Jim Pirzyk.
Ah yes, you are correct. While FreeBSD does not follow the RedHat RPM naming
scheme, my patch could cause problems. I would suggest this regex instead:
pkgdelete "#{@resource[:name]}-[^-]*"
as to limit the wildcarding to the version. We don't use the - for revisions,
it is either _ or , depending on the scope.
pirzyk@amigo:/var/db/pkg
23>ls -1d ruby* puppet* facter*
facter-1.6.16
puppet-2.7.19_3
ruby-1.9.3.327,1
ruby19-bdb-0.6.6
ruby19-date2-4.0.19
ruby19-deplate-0.8.5
ruby19-gems-1.8.24
ruby19-iconv-1.9.3.327,1
rubygem-ruby-augeas-0.4.1
----------------------------------------
Bug #17807: pkg_delete on FreeBSD does not work
https://projects.puppetlabs.com/issues/17807#change-79825
Author: Jim Pirzyk
Status: Needs More Information
Priority: Normal
Assignee: Jim Pirzyk
Category:
Target version:
Affected Puppet version:
Keywords: FreeBSD, pkg_delete
Branch:
Given this puppet code:
package { 'gawk':
ensure => absent
}
generates this error:
err: /Stage[main]/Awk::Gawk/Pkg[gawk]/Package[gawk]/ensure: change from 4.0.1
to absent failed: Execution of '/usr/sbin/pkg_delete gawk-absent' returned 1:
pkg_delete: no such package 'gawk-absent' installed
Obviously this is not a proper pkg_delete command line. It should not be using
the ensure parameter. See provided patch for simple fix (using regex to match
version).
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.