1. 02 Aug, 2019 1 commit
  2. 20 Feb, 2019 1 commit
  3. 18 Feb, 2019 1 commit
  4. 27 Dec, 2018 1 commit
  5. 26 Nov, 2018 1 commit
  6. 03 Sep, 2018 2 commits
  7. 31 Aug, 2018 2 commits
  8. 27 Apr, 2018 1 commit
    • userinfo: expose values as string · f06e61a6
      To be compatible with buildout (and not only `slapos.recipe.template:jinja2`)
      
      See [#20180416-1138FFA](https://nexedi.erp5.net/bug_module/20180416-1138FFA/)
      
      ---
      
      Running this buildout:
      
      ```
      [buildout]
      parts=x
      
      [userinfo]
      recipe = slapos.cookbook:userinfo
      
      [x]
      recipe = plone.recipe.command
      command = echo "Hello user id ${userinfo:pw-uid}"
      ```
      
      
      In a slapos patched buildout it outputs: `"Hello user id !py!991"` (which means it's not usable for references directly in other buildout parts)
      
      In a "non patched" buildout fail with error:
      
      ```
      While:
        Installing.
        Getting section x.
        Initializing section x.
        Getting option x:command.
        Getting section userinfo.
        Initializing section userinfo.
      
      An internal error occurred due to a bug in either zc.buildout or in a
      recipe being used:
      Traceback (most recent call last):
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 2127, in main
          getattr(buildout, command)(args)
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 681, in install
          [self[part]['recipe'] for part in install_parts]
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1278, in __getitem__
          options._initialize()
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1376, in _initialize
          self._dosub(k, v)
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1431, in _dosub
          v = '$$'.join([self._sub(s, seen) for s in v.split('$$')])
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1495, in _sub
          v = self.buildout[section].get(option, None, seen)
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1278, in __getitem__
          options._initialize()
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1386, in _initialize
          self.initialize()
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1395, in initialize
          self.recipe = recipe_class(buildout, name, self)
        File "/tmp/x/eggs/slapos.cookbook-1.0.62-py2.7.egg/slapos/recipe/userinfo.py", line 13, in __init__
          options['pw-uid'] = pinfo.pw_uid
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1520, in __setitem__
          raise TypeError('Option values must be strings', value)
      TypeError: ('Option values must be strings', 991)
      ```
      
      /cc @Nicolas @alain.takoudjou  @vpelletier 
      
      /reviewed-on !321
      Jérome Perrin committed
  9. 04 Apr, 2018 1 commit
  10. 12 Mar, 2018 1 commit
  11. 13 Feb, 2018 1 commit
  12. 14 Nov, 2017 1 commit
  13. 02 Oct, 2017 2 commits
  14. 13 Jun, 2017 2 commits
  15. 21 Mar, 2017 1 commit
  16. 24 Jan, 2017 2 commits
  17. 30 Dec, 2016 1 commit
  18. 15 Nov, 2016 1 commit
  19. 21 Oct, 2016 1 commit
  20. 17 Oct, 2016 1 commit
  21. 29 Sep, 2016 1 commit
  22. 27 Sep, 2016 1 commit
  23. 16 Sep, 2016 1 commit
  24. 15 Sep, 2016 1 commit
  25. 12 May, 2016 1 commit
  26. 20 Apr, 2015 1 commit
  27. 09 Apr, 2015 2 commits
  28. 03 Apr, 2015 2 commits
  29. 08 Dec, 2014 1 commit
  30. 29 Oct, 2014 1 commit
  31. 22 Oct, 2014 1 commit
  32. 29 Sep, 2014 1 commit