Normalizing output dir for charm build

Alex Kavanagh alex.kavanagh at canonical.com
Wed May 10 19:45:43 UTC 2017


Good work here, thanks Merlijn.  My instinct is that, if we are changing
behaviour, then the option probably needs to be mandatory so that affected
tool chains actually break in a predictable way, rather than in an obscure
"huh, what's going on here".

So, I'm in agreement with Cory's proposal.

Cheers
Alex.


On Wed, May 10, 2017 at 3:36 PM, Merlijn Sebrechts <
merlijn.sebrechts at gmail.com> wrote:

> * Drop the "builds" portion of the output directory (that was mainly to
>> distinguish it from the series portion).
>>
>
> We still need to distinguish the charms from `deps` and possibly from
> `layers` and `interfaces`.
>
> This is my $JUJU_REPOSITORY:
>
> ├── charms
> │   ├── builds
> │   ├── deps
> │   ├── interfaces
> │   ├── layers
>
>
> 2017-05-10 20:03 GMT+02:00 Cory Johns <cory.johns at canonical.com>:
>
>> Started on https://github.com/juju/charm-tools/pull/320, I'd like to
>> bring this discussion to the list.
>>
>> The output directory for charm build can vary in seemingly unpredictable
>> ways depending on how it is called, the environment, and the charm's
>> metadata.yaml contents.  This is due to historical reasons, primarily with
>> how Juju 1.x worked and how charm paths worked prior to the advent of
>> multi-series charms.  However, now that 2.x and multi-series support are
>> standard, I would like to push for simplifying the output directory, based
>> on Merlijn's PR.
>>
>> Specifically, I'd like to push for the following changes:
>>
>> * Drop the series portion of the output directory (we recommend providing
>> the series in the charm's metadata, making it redundant in the path).
>> * Drop the "builds" portion of the output directory (that was mainly to
>> distinguish it from the series portion).
>> * Drop the current directory as a fallback option for the output
>> directory (it causes more confusion than it saves).
>>
>> Thus, charm build would always require an output directory to be given
>> either via --output-dir (-o) or via the $JUJU_REPOSITORY environment
>> variable, and would always put the built charm in $output_dir/$charm_name
>>
>> Obviously, this is not backwards compatible, and may affect automated
>> build systems, but I think it would be easy to adjust for and simplify
>> things for everyone concerned.
>>
>> Thoughts?  Objections?
>>
>> --
>> Juju mailing list
>> Juju at lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/juju
>>
>>
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju
>
>


-- 
Alex Kavanagh - Software Engineer
Cloud Dev Ops - Solutions & Product Engineering - Canonical Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20170510/ee49a270/attachment.html>


More information about the Juju mailing list