Project

General

Profile

Actions

Bug #3301

closed

With CFEngine 3.4.2, alternance of curled brace and parenthesis does not work.

Added by Nicolas PERRON about 11 years ago. Updated about 9 years ago.

Status:
Released
Priority:
1
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

Alternance of curled brace and parenthesis doesn't work with CFEngine 3.4.2 but it seems that at least common/1.0/promises.st contain some of them.

We should use only curled brace on it and check that no other files have the same bug.

Pull Request: https://github.com/Normation/rudder-techniques/pull/61

Actions #1

Updated by Nicolas CHARLES about 11 years ago

Bug oppened on the CFEngine bugtracker
https://cfengine.com/dev/issues/2202

Actions #2

Updated by Jonathan CLARKE about 11 years ago

  • Status changed from New to 8
  • Assignee set to Nicolas PERRON

This is a very high priority bug for us. It means that many of our Techniques won't work in Rudder 2.6 who's release is planned to start in a few weeks. Please start fixing, to use only ${}.

Actions #3

Updated by Nicolas PERRON about 11 years ago

  • Status changed from 8 to In progress

Jonathan CLARKE wrote:

This is a very high priority bug for us. It means that many of our Techniques won't work in Rudder 2.6 who's release is planned to start in a few weeks. Please start fixing, to use only ${}.

Ok, I'm starting to think about a sed comamnd to change each $() by ${}.

I've tried this

sed 's@^\(.*\)\$(\(\[^)\]*\))\(.*\)$@\1\$\{\2\}\3@g'

But it does not match end parenthesis related to "$(".

Actions #4

Updated by Nicolas PERRON about 11 years ago

Seems correct but I will test it on whole Techniques:

sed 's@^\(.*\)\$(\([^\)]*\))\(.*\)$@\1\$\{\2\}\3@g'
Actions #5

Updated by Nicolas PERRON about 11 years ago

  • Description updated (diff)
  • Status changed from In progress to Pending technical review
  • % Done changed from 0 to 100
Actions #6

Updated by Nicolas PERRON about 11 years ago

I've use this command as you adviced me:

sed 's/\@(\(.*\))/\@{\1}/g'

Nevertheless, some files have been manually edited.

Actions #7

Updated by Nicolas PERRON about 11 years ago

Jon or Nico, could you review please ?

Actions #8

Updated by Nicolas CHARLES about 11 years ago

  • Status changed from Pending technical review to In progress

Nicolas, you forgot the initial-promises part, which also contains $(${})
could you modify them as well ?

Thanks

Actions #9

Updated by Nicolas PERRON about 11 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas PERRON to Nicolas CHARLES

Nicolas CHARLES wrote:

Nicolas, you forgot the initial-promises part, which also contains $(${})
could you modify them as well ?

Thanks

Ok, I've updated the PR to modify the initial-promises too.
To resume, I've used theses commands:

  • Change $() into ${}
    sed 's@\$(\([^\(\)]*\))@$\{\1\}@g'
    
  • Change () into {} but was few used
    sed 's/\@(\(.*\))/\@{\1}/g'
    

Nico, could you review it, please ?

Actions #10

Updated by Nicolas PERRON about 11 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:ff72beb0a3509df84af062da35712081c6b3be37.

Actions #11

Updated by Jonathan CLARKE about 11 years ago

  • Status changed from Pending release to Released

This ticket has been addressed in version 2.6.0~beta1 of Rudder, which has just been released. Please see the changelog here: https://www.rudder-project.org/foswiki/System/Documentation:ChangeLog26.

Actions #12

Updated by Benoît PECCATTE about 9 years ago

  • Project changed from 24 to Rudder
  • Category changed from Techniques to Techniques
Actions

Also available in: Atom PDF