Issue #10146 has been updated by Brice Figureau.
Henrik Lindberg wrote:
> Peter Meier wrote:
> > > We should also reconsider - in class names for similar reasons
> > > ${foo-bar::baz}, gross.
> >
> > If we want to do this, this should be treated as seperate issue. - in class
> > names have been working for a long time and is widely used. So this would
> > definitely require a proper deprecation path.
>
> Since this is the case ('-' in classnames are allowed), the proposal to just
> make an ending '-' illegal in a variable name (and class name) may be a
> better option. If '-' is allowed in classnames, there is no way to refer to
> variables in such classes.
>
> Fixing it this way (no '-' at end) may be the lesser of all evils.
Yes, that was my idea (and 1st comment on this ticket) except it doesn't really
work.
People that are complaining are complaining because the interpolation of
"$a-randomstring" doesn't evaluate to "${a}-randomstring" but
"${a-randomstring}".
If you forbid trailing '-' but allow it anywhere else, then "$a-randomstring"
will still be seen as "${a-randomstring}", because a-randomstring becomes a
valid variable name.
----------------------------------------
Bug #10146: Puppet interpolates variables differently in 2.7.x
https://projects.puppetlabs.com/issues/10146
Author: Philip Gardner
Status: Needs Decision
Priority: High
Assignee: Nigel Kersten
Category: language
Target version: 2.7.x
Affected Puppet version: 2.7.5
Keywords:
Branch:
I'm not sure when this changed, but I recently upgraded from 2.6.7 to 2.7.5.
Given: file { "/usr/local/$lsbdistid-$architecture": ensure => directory }
In 2.6.7 the following would generate a directory name called
"/usr/local/CentOS-x86_64":
However, in 2.7.5, this now creates a directory called "/usr/local/-x86_64"
If you escape the variables, the resource is created correctly, however this
wasn't clear until I jumped on IRC.
--
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.