Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

charm build overwrites files silently #599

Open
3 tasks done
rgildein opened this issue Feb 1, 2021 · 1 comment
Open
3 tasks done

charm build overwrites files silently #599

rgildein opened this issue Feb 1, 2021 · 1 comment

Comments

@rgildein
Copy link
Contributor

rgildein commented Feb 1, 2021

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?

I ran the following command: charm version and got the following output:

charmstore-client 2.5.1
charm-tools 2.8.1

I am using: Ubuntu Focal

Issue/Feature

Charm build should not overwrite files silently, but should raise an error when file already exist and comes from another layer.

I expect/expected the following

While building charm-openstack-integrator:

charm-build --log-level DEBUG -o ~/canonical/charm-build/ .
charm-build: error: An attempt was made to overwrite a file "lib/charms/layer/__init__.py" with a layer "snap". The file has already been created by a layer "basic"

What I got

Because the merge layer: snap contains the file __init __.py, __init__.py from the layer: basic will be overwritten.

While building charm-openstack-integrator:

charm-build --log-level DEBUG -o ~/canonical/charm-build/ .
cat ~/canonical/charm-build/builds/openstack-integrator/.build.manifest | grep -A 3 'layer/__init__.py'
    "lib/charms/layer/__init__.py": [
      "layer:snap",
      "static",
      "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
@auria
Copy link

auria commented Feb 2, 2021

The layer:snap commit that caused this overlap has been reverted [1].

  1. https://code.launchpad.net/~canonical-is-bootstack/layer-snap/+git/layer-snap/+merge/397254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants