{{ message }}
Repository navigation
Fix #4842: Installation of different LICENSE files (per opam package in a multi-opam repository/project) - #16524
Open
pamod-madubashana wants to merge 1 commit into
Conversation
…kage in a multi-opam repository/project) Signed-off-by: Pamod Madubashana <contact@pamod.is-a.dev>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #4842
Description
Allow explicit
(install)stanzas to override the auto-detected odig docfiles (
README*,LICENSE*,CHANGE*,HISTORY*).Dune automatically installs those files found in the package directory into
the
docsection of every package. Until now there was no way to replacethem: adding an
(install)stanza that installs e.g.(LICENSE.md.<package> as LICENSE.md)for a single package produced aMultiple rules generated for .../doc/<package>/LICENSE.mderror, so therewas no way to ship a different LICENSE file per opam package in a
multi-package project.
I now drop an auto-detected
docentry when an explicit user-writteninstall entry targets the same
(section, dst). The explicit entry wins andno duplicate rule is generated. Auto-detection is unchanged when there is no
explicit override.
Fixes #4842
Verification
The relevant test for this area is the existing odig workspace test:
plus a full check with:
I could not run them here: this environment has no OCaml toolchain
(
_boot/dune.exeis absent and neitherdunenorocamlis onPATH), sono test could be run. The change is confined to
stanzas_to_entriesinsrc/dune_rules/install_rules.mland only filtersDune-sourcedDocentries that collide with a
User-sourced entry on(section, dst).