Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make it easier to keep a license file in sync with a partial-repository mirror #125

@mattmccutchen

Description

@mattmccutchen

Suppose I want to vendor a subdirectory of an upstream repository, and the upstream license requires me to include a copy of the license in my repository (as is typical for open-source licenses), but the license in the upstream repository is outside the subdirectory I vendored. Then I have to add the license separately. This would be easy to do with a separate Braid mirror. Here's an example of a .braids.json file where I took this approach for my mirrors of the https://github.com/meteor/react-packages repository.

But now I'm responsible to ensure that if the upstream license ever changes, my copy of the license stays in sync with the version of the code in my repository. Normally, that would mean keeping the content and license mirrors at the same upstream revision. (I should probably read the new license too and ensure it's still acceptable to me, but it's unclear whether there's any reasonable way Braid can help with that.) If I run braid update on all mirrors, that should keep the two mirrors in sync, barring a race condition in which the upstream repository is updated while braid update is running. However, if I update the content mirror individually, it would be easy to forget to update the license mirror.

Ideally, Braid would have functionality that could be applied to solve this problem in a robust way. Granted, the problem is probably very rare and upstreams are likely to be forgiving of this kind of mistake, but I guess I'm a stickler.

The obvious design would be to have a mirror that has a single upstream repository and revision but can map multiple upstream paths to different downstream paths. I'll tentatively call this a "multi-component mirror", and it might have uses beyond license compliance. While the idea is simple, nailing down all the details of implementation and command-line usage would add a lot of complexity that we'd have to maintain indefinitely, so I don't want to do it unless there's a lot more evidence of demand from users. (The usual refrain.)

If you want a solution to the license sync problem or you have ideas, please add your thumbs-up or comment. For now, I'm just filing an issue to document the problem, and users can cope with the status quo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions