+
Skip to content

Make tar structure compatible with plain release_handler upgrades #936

@verbit

Description

@verbit

When creating a tar, relx produces the following structure (simplified for demonstration)

├── erts-13.1.5
│   └── ...
├── lib
│   └── ...
└── releases
    ├── 0.7.0
    │   ├── relup
    │   ├── start.boot
    │   ├── start.script
    │   ├── sys.config
    │   └── myrel.rel
    ├── RELEASES
    ├── start_erl.data
    └── myrel.rel

in a file named myrel-0.7.0.tar.gz.

Now, if I want to unpack that with release_handler, it expects the structure to look like this (note the name of the .rel files):

├── erts-13.1.5
│   └── ...
├── lib
│   └── ...
└── releases
    ├── 0.7.0
    │   ├── relup
    │   ├── start.boot
    │   ├── start.script
    │   ├── sys.config
    │   └── myrel-0.7.0.rel
    ├── RELEASES
    ├── start_erl.data
    └── myrel-0.7.0.rel

That is, when unpacking a release called RelPackageName.tar.gz, it expects the .rel files to be named RelPackageName.rel. The relx-generated script plays some tricks to make it work but that forces everyone to do the same when not using anything relx-specific for upgrades.

So my question is: Is there a reason relx uses RelName.rel for .rel files? Can this be changed to RelName-Vsn.rel to make the RelName-Vsn.tar.gz tar compatible with plain release_handler? Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载