Skip to content

Commit 96f4d16

Browse files
author
Morgan Haskel
committed
MODULES-1759: Remove dependency on stdlib >=4.1.0
Backported dirname => mysql_dirname since updating dependency to stdlib 4.1.0 is backwards incompatible with some versions of PE.
1 parent b57191f commit 96f4d16

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module Puppet::Parser::Functions
2+
newfunction(:mysql_dirname, :type => :rvalue, :doc => <<-EOS
3+
Returns the dirname of a path.
4+
EOS
5+
) do |arguments|
6+
7+
raise(Puppet::ParseError, "mysql_dirname(): Wrong number of arguments " +
8+
"given (#{arguments.size} for 1)") if arguments.size < 1
9+
10+
path = arguments[0]
11+
return File.dirname(path)
12+
end
13+
end
14+
15+
# vim: set ts=2 sw=2 et :

manifests/server/config.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
$logbin = pick($options['mysqld']['log-bin'], $options['mysqld']['log_bin'], false)
2323

2424
if $logbin {
25-
$logbindir = dirname($logbin)
25+
$logbindir = mysql_dirname($logbin)
2626
file { $logbindir:
2727
ensure => directory,
2828
mode => '0755',

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
],
7777
"description": "Mysql module",
7878
"dependencies": [
79-
{"name":"puppetlabs/stdlib","version_requirement":">= 4.1.0 < 5.0.0"},
79+
{"name":"puppetlabs/stdlib","version_requirement":">= 3.2.0 < 5.0.0"},
8080
{"name":"nanliu/staging","version_requirement":"1.x"}
8181
]
8282
}

0 commit comments

Comments
 (0)