juju / charm-tools

Tools for charm authors and maintainers
Other
42 stars 64 forks source link

`charm create` does not work on bionic #642

Closed fnordahl closed 1 year ago

fnordahl commented 1 year ago
# charm create test
INFO: Using default charm template (reactive-python). To select a different template, use the -t option.
INFO: Generating charm for test in ./test
INFO: No test in apt cache; creating an empty charm instead.
Cloning into '/tmp/tmphchv71_2'...
/snap/charm/684/usr/lib/git-core/git-remote-https: error while loading shared libraries: libbrotlidec.so.1: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/snap/charm/684/usr/bin/charm-create", line 33, in <module>
    sys.exit(load_entry_point('charm-tools==0.0.0', 'console_scripts', 'charm-create')())
  File "/snap/charm/684/usr/lib/python3.10/site-packages/charmtools/create.py", line 98, in main
    generator.create_charm()
  File "/snap/charm/684/usr/lib/python3.10/site-packages/charmtools/generators/generator.py", line 82, in create_charm
    self.plugin.create_charm(user_config, tempdir)
  File "/snap/charm/684/usr/lib/python3.10/site-packages/charmtools/templates/reactive_python/template.py", line 47, in create_charm
    self._clone_template(config, output_dir)
  File "/snap/charm/684/usr/lib/python3.10/site-packages/charmtools/templates/reactive_python/template.py", line 81, in _clone_template
    subprocess.check_call(cmd.split())
  File "/snap/charm/684/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'clone', 'https://github.com/juju-solutions/template-reactive-python', '/tmp/tmphchv71_2']' returned non-zero exit status 128.

Probably a missing stage package.

fnordahl commented 1 year ago

It is worth noting that the recommended approach for creating new charms is to use the ops framework.

The charm create command will be deprecated and the replacement would be charmctaft init