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

Fix installation of metapackages from repositories #4192

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Sep 23, 2024

Problems

Causes

  • Metapackages and dependencies were being filtered out, so the install flow was quitting on an empty changeset
  • GitHub's API documentation now says to set the Accept header to application/vnd.github+json to download a source ZIP rather than a value that corresponds to a ZIP file type (!!!)
    https://docs.github.com/en/rest/repos/contents#download-a-repository-archive-zip
    image
  • The Auto-Installed checkbox has gone through a number of changes relating to the ability to remove individual items from the changeset screen, which at some point probably severed the link between it and refreshing the changeset, but I was not able to pinpoint precisely when this occurred.

Changes

  • Now it's fine to put metapackages in a changeset; they'll just be skipped during the parts of installation that involve downloading and unzipping files. An InstalledModule will still be added to the registry even though no files are installed for a metapackage, so it can be upgraded when there are updates in the upstream repo. Immediate dependencies of a metapackage will be marked as non-auto-installed by default so the metapackage does not have to remain installed to keep the mods (since this is how "install from .ckan" currently works).
  • Now the GithubTransformer will set download_content_type to application/vnd.github+json when x_netkan_github.use_source_archive is true, so clients will pass the mime type that GitHub foolishly requires for source ZIPs
  • Now GUIMod.SetAutoInstallChecked raises the PropertyChanged event with an argument of IsAutoInstalled, which ManageMods receives and handles by refreshing the changeset

@HebaruSan HebaruSan added Bug Something is not working as intended GUI Issues affecting the interactive GUI Core (ckan.dll) Issues affecting the core part of CKAN Netkan Issues affecting the netkan data labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Core (ckan.dll) Issues affecting the core part of CKAN GUI Issues affecting the interactive GUI Netkan Issues affecting the netkan data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant