Strange error when layered charm destination exists

Bug #1504105 reported by Merlijn Sebrechts on 2015-10-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charm-tools (Ubuntu)
Undecided
Unassigned

Bug Description

Use-case: You have a "normal" Charm and you start porting it to composer. You copy the charm from /trusty/mycharm to /layers/mycharm. You start splitting the charm in layers and run `charm generate mycharm`

Expected result: You get an error explaining that the Charm /trusty/mycharm already exists, and would be overwritten by `charm generate`

Result you get: The following error message:

composer: Added unexpected file, should be in a base layer: juju-client/config.yaml
Traceback (most recent call last):
  File "/tmp/charm-tools/bin/charm-generate", line 9, in <module>
    load_entry_point('charm-tools==1.7.1', 'console_scripts', 'charm-generate')()
  File "/tmp/charm-tools/local/lib/python2.7/site-packages/charmtools/compose/__init__.py", line 468, in main
    composer()
  File "/tmp/charm-tools/local/lib/python2.7/site-packages/charmtools/compose/__init__.py", line 392, in __call__
    self.validate()
  File "/tmp/charm-tools/local/lib/python2.7/site-packages/charmtools/compose/__init__.py", line 384, in validate
    "Unable to continue due to unexpected modifications (try --force)")
ValueError: Unable to continue due to unexpected modifications (try --force)

I think my use-case will happen a lot with people just starting with charms layers. It would be great if the error message could be a little more explanatory, and not give a python traceback...

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers