1. 01 Oct, 2012 2 commits
  2. 11 Sep, 2012 4 commits
  3. 10 Sep, 2012 2 commits
  4. 05 Sep, 2012 10 commits
  5. 04 Sep, 2012 5 commits
  6. 30 Aug, 2012 6 commits
  7. 23 Aug, 2012 1 commit
  8. 02 Aug, 2012 7 commits
  9. 17 Jul, 2012 2 commits
    • Antoine Catton's avatar
      0ce2eca0
    • Antoine Catton's avatar
      Add escape option in order to avoid script formatting · 125fdd0f
      Antoine Catton authored
      The script is formatted with self.options dictionnary.
      
      For example :
      
        [foobar]
        recipe = slapos.recipe.build
        foo = bar
        script =
          print '%(foo)s'
      
      Produces :
      
        Installing foobar.
        bar
      
      But this can mess up the python code, because there's no
      escaping. For example :
      
        [foobar]
        recipe = slapos.recipe.build
        foo = bar's
        script =
          print '%(foo)s'
      
      Produces :
      
        While:
          Installing foobar.
      
        An internal error occurred due to a bug in either zc.buildout or in a
        recipe being used:
        Traceback (most recent call last):
          File "<string>", line 2
            print 'bar's'
                       ^
        SyntaxError: invalid syntax
      
      We can workaround this by using :
      
        [foobar]
        recipe = slapos.recipe.build
        foo = bar's
        script =
            print '%%s' %% self.options['foo']
      
      But every percent sign has to be escaped. That's why, this
      commit introduces :
      
        [foobar]
        recipe = slapos.recipe.build
        foo = bar's
        format = no
        script =
            print '%s' % self.options['foo']
      
      NB: This commit doesn't remove formating for backward compatibility.
      125fdd0f
  10. 07 Jun, 2012 1 commit