charm compose collides with libs when they are shared among layers

Bug #1491522 reported by Charles Butler
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juju Charm Tools
Fix Committed
Critical
Unassigned

Bug Description

When building a charm from resulting compose layers that appear to have shared dependencies, composer fails w/ "library already exists"

http://paste.ubuntu.com/12254981/

Relevent snippet from the above debug log:

utils: process: pip install -U --exists-action i -t /tmp/tmpmb9Jra charmhelpers>=0.4.0,<1.0.0 (0)
Traceback (most recent call last):
  File "/home/charles/.virtualenv/bin/charm-compose", line 9, in <module>
    load_entry_point('charm-tools==1.6.1', 'console_scripts', 'charm-compose')()
  File "/home/charles/.virtualenv/local/lib/python2.7/site-packages/charmtools/compose/__init__.py", line 462, in main
    composer()
  File "/home/charles/.virtualenv/local/lib/python2.7/site-packages/charmtools/compose/__init__.py", line 391, in __call__
    self.generate()
  File "/home/charles/.virtualenv/local/lib/python2.7/site-packages/charmtools/compose/__init__.py", line 357, in generate
    self.exec_plan(self.plan, self.layers)
  File "/home/charles/.virtualenv/local/lib/python2.7/site-packages/charmtools/compose/__init__.py", line 335, in exec_plan
    tactic()
  File "/home/charles/.virtualenv/local/lib/python2.7/site-packages/charmtools/compose/tactics.py", line 417, in __call__
    d.move(target)
  File "/usr/lib/python2.7/shutil.py", line 292, in move
    raise Error, "Destination path '%s' already exists" % real_dst
shutil.Error: Destination path '/home/charles/tmp/charms/trusty/docker-nginx/lib/markupsafe' already exists

This appears to be an issue with the default tactic colliding on a dependent file that is surfaced from the "base" layer and causes the composition to fail.

Tags: compose

Related branches

tags: added: compose
Marco Ceppi (marcoceppi)
Changed in charm-tools:
importance: Undecided → Critical
milestone: none → 1.6.2
status: New → Triaged
Changed in charm-tools:
status: Triaged → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.