ignore tactic fails when using layer:apt #251

Open
marcoceppi opened this Issue Aug 29, 2016 · 3 comments

Comments

Projects
None yet
3 participants
Owner

marcoceppi commented Aug 29, 2016

Checklist

  • Confirmed this is an issue with charm-tools, not charmstore-client
  • Provide versions of tools used
  • Described the feature or ways to replicate the issue

What version am I running?

master branch

I am using: Xenial

Issue/Feature

I expect/expected the following

I expected charm build to build a charm where README.md from a lower layer was ignored.

What I got

build: Composing into /home/bregeer/snmpd
build: Destination charm directory: /home/bregeer/snmpd/builds/snmpd
build: Processing layer: layer:basic
build: Processing layer: layer:apt
Traceback (most recent call last):
  File "/usr/bin/charm-build", line 9, in <module>
    load_entry_point('charm-tools==2.1.2', 'console_scripts', 'charm-build')()
  File "/usr/lib/python2.7/dist-packages/charmtools/build/__init__.py", line 673, in main
    build()
  File "/usr/lib/python2.7/dist-packages/charmtools/build/__init__.py", line 516, in __call__
    self.generate()
  File "/usr/lib/python2.7/dist-packages/charmtools/build/__init__.py", line 467, in generate
    self.formulate_plan(layers)
  File "/usr/lib/python2.7/dist-packages/charmtools/build/__init__.py", line 408, in formulate_plan
    self.plan = self.plan_layers(layers, output_files)
  File "/usr/lib/python2.7/dist-packages/charmtools/build/__init__.py", line 324, in plan_layers
    output_files=output_files))
  File "/usr/lib/python2.7/dist-packages/charmtools/build/__init__.py", line 320, in <genexpr>
    list(e for e in utils.walk(layer.directory,
  File "/usr/lib/python2.7/dist-packages/charmtools/utils.py", line 348, in walk
    yield (entry, fn(entry, **kwargs))
  File "/usr/lib/python2.7/dist-packages/charmtools/build/__init__.py", line 296, in build_tactics
    tactic = current.combine(existing)
AttributeError: 'NoneType' object has no attribute 'combine'

Example repository

@marcoceppi marcoceppi added this to the 2.1.PATCH milestone Aug 29, 2016

@marcoceppi thanks for filing a bug report on my behalf.

Contributor

stub42 commented Aug 30, 2016

I've merged @marcoceppi 's patch to the apt layer, so things should be good now.

@stub42 Even with the layer.yml fix it still fails with the same error message if I leave the ignore line in my layer.yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment