charm-tools icon indicating copy to clipboard operation
charm-tools copied to clipboard

Charm build output dir is different depending on where you run it.

Open merlijn-sebrechts opened this issue 8 years ago • 2 comments

Checklist

  • [X] Confirmed this is an issue with charm-tools, not charmstore-client
  • [X] Provide versions of tools used
  • [X] 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 ouput:

charm 2.2.0-0ubuntu1~ubuntu16.04.1~ppa2
charm-tools 2.2.0

I am using: Ubuntu 16.04

Issue/Feature

charm build has a different output directory depending on how you supply the layer to build.

Reproduce:

cd $LAYER_PATH
`charm build openvpn`
# destination dir is $JUJU_REPOSITORY/builds/openvpn

cd $LAYER_PATH/../
`charm build openvpn`
# destination dir is $JUJU_REPOSITORY/trusty/openvpn

cd $LAYER_PATH/../
`charm build $LAYER_PATH/openvpn`
# destination dir is $JUJU_REPOSITORY/builds/openvpn

I expect/expected the following

All these commands have the same output dir

What I got

The output dir is different

merlijn-sebrechts avatar Feb 24 '17 12:02 merlijn-sebrechts

@petevg also has this issue.

merlijn-sebrechts avatar Feb 24 '17 12:02 merlijn-sebrechts

We should revisit this and make the output directory consistent. We should also remove the default behavior when $JUJU_REPOSITORY is not set to build inside the current directory, since that will almost always lead to incorrect results.

johnsca avatar Nov 02 '17 14:11 johnsca