# I have 3 layers (bottom, middle, and top) that include the lower layer as we move up:
ubuntu@0f0e62f4cb6a:~/charms/layers$ grep include layer-bottom/layer.yaml layer-middle/layer.yaml layer-top/layer.yaml
layer-bottom/layer.yaml:includes: ['layer:basic']
layer-middle/layer.yaml:includes: ['layer:basic', 'layer:layer-bottom']
layer-top/layer.yaml:includes: ['layer:basic', 'layer:layer-middle']
# I have a config item defined in bottom and middle, but not top:
ubuntu@0f0e62f4cb6a:~/charms/layers$ grep default layer-bottom/config.yaml layer-middle/config.yaml layer-top/config.yaml
layer-bottom/config.yaml: default: "BOTTOM"
layer-middle/config.yaml: default: "MIDDLE"
grep: layer-top/config.yaml: No such file or directory
# I build and see that it processes the middle layer before the bottom. Odd, i think:
ubuntu@0f0e62f4cb6a:~/charms/layers/layer-top$ charm build -r
build: Composing into /home/ubuntu/charms
build: Destination charm directory: /home/ubuntu/charms/trusty/layer-top
fatal: Not a git repository (or any parent up to mount point /home/ubuntu/charms)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
bzr: ERROR: Not a branch: "/home/ubuntu/charms/layers/layer-top/".
build: Please add a `repo` key to your layer.yaml, with a url from which your layer can be cloned.
build: Processing layer: layer:basic
build: Processing layer: layer:layer-middle
build: Processing layer: layer:layer-bottom
build: Processing layer: layer-top
build:
build: ---------------------------------------
build: Build Report
build: ---------------------------------------
build: New build; all files were modified.
# Now I check my top layer config value, and it's from the bottom layer :( I would expect this to have the middle config value:
ubuntu@0f0e62f4cb6a:~/charms/layers/layer-top$ cat ~/charms/trusty/layer-top/config.yaml
"options":
"string-option":
"type": "string"
"default": "BOTTOM"