Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netkan errors and warnings for Harmony bundlers #3326

Merged
merged 1 commit into from
Mar 17, 2021

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Mar 17, 2021

Background

See KSP-CKAN/NetKAN#8288, we are attempting to prevent mods that bundle conflicting versions of Harmony from clashing with each other.

Harmony 1

Before that PR, all Harmony-based mods in CKAN bundled Harmony 1, and CKAN installed them as-is. They may continue to do so, but only if they are appropriately flagged in the metadata:

    "provides": [ "Harmony1" ],
    "x_netkan_staging": true,
    "x_netkan_staging_reason": "Bundles Harmony. Please check the DLL's version, and if it's 2 or later, remove the provides and add a depends on Harmony2.",

A mod with this metadata will be treated as incompatible with Harmony2, and each time it releases a new version, it will be staged for manual review so we can check whether the author has upgraded to Harmony 2.

Harmony 2

Mods that use Harmony 2 will share a common dependency on the new Harmony2 module, and any bundled copies they may include will be filtered out:

    "depends": [
        { "name": "Harmony2" }
    ],
    "install": [ {
        "filter_regexp": [ "0Harmony.*\\.dll" ]
    } ]

Problem

The remaining gap in this strategy is that any mod author might decide to add Harmony to an existing mod at any time, and we would be none the wiser. There may even be some existing ones that we didn't catch in the first round of updates.

Changes

Now if a mod installs a DLL with "Harmony" in its name and it doesn't provide Harmony1, the inflator emits an error, to prevent any newly bundled files from causing conflicts in user installs. These must then be inspected manually to determine which version of Harmony is bundled, and then the appropriate solution will be applied.

Now if a mod does provide Harmony1 but doesn't seem to bundle it, the inflator emits a warning.

The Harmony2 module is exempted from these checks.

@HebaruSan HebaruSan added Enhancement New features or functionality Easy This is easy to fix Pull request Netkan Issues affecting the netkan data Relationships Issues affecting depends, recommends, etc. labels Mar 17, 2021
Copy link
Member

@DasSkelett DasSkelett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like a charm, thanks! Now we are prepared for all eventualities.

@HebaruSan HebaruSan merged commit 0d3ddd2 into KSP-CKAN:master Mar 17, 2021
@HebaruSan HebaruSan deleted the feature/netkan-warn-harmony branch March 17, 2021 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy This is easy to fix Enhancement New features or functionality Netkan Issues affecting the netkan data Relationships Issues affecting depends, recommends, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants