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

Handling of ~/.ghcup/share #1065

Open
hasufell opened this issue May 17, 2024 · 1 comment
Open

Handling of ~/.ghcup/share #1065

hasufell opened this issue May 17, 2024 · 1 comment

Comments

@hasufell
Copy link
Member

Unfortunately it's a symlink. If we want to install other manpages, we have to migrate it to a proper directory and only symlink the ghc manpage.

Related: #235

@dfordivam
Copy link
Collaborator

Currently the share dir is a link to the dir inside the currently set ghc.

.ghcup/share -> ./ghc/<ver>/share

The man page is located here .ghcup/share/man/man1/ghc.1

The ghcup man page should be put alongside ghc's, ie here .ghcup/share/man/man1/ghcup.1

There are at least three related concerns

  1. Fresh installation

During the fresh installation, ideally manpages should be installed by the bootstrap script. The bootstrap script will have knowledge of where manpages are published (hopefully alongside the exe?)

  1. Upgrade from older ghcup (when .ghcup/share is still a symlink)

when user upgrades from older ghcup, only the new exe would be installed.
So the ghcup itself would have to do the migration of .ghcup/share, which would involve removing the link, and the perform rest of steps of the installation + setting the doc and ghc's man links.

The ghcup would need to know where the manpages are published for its own version.

  1. Upgrade ghcup, after the migration from symlink

    This should be straightforward, when the upgrade modifies the .ghcup/bin/ghcup, alongside this new manpage would be installed.

Another change required wrt the handling of .ghcup/share is about setting the currently set ghc's doc dir's contents to .ghcup/share/doc/, and link the ghc/share/man/man1/ghc.1 to .ghcup/share/man/man1/ghc.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants