Skip to content
Snippets Groups Projects

bootstrap-haskell: XDG: set proper GHCUP_DIR & create it

All threads resolved!

Fixes XDG install mode.

Without XDG - GHCUP_BIN was creating ~/.ghcup/bin recursively before GHCUP_DIR ~/.ghcup was used. XDG setting exposed that case, because now GHCUP_BIN does not include GHCUP_DIR.

Makes sure that the directory exists before putting a file into it.

Edited by Anton Latukha

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Anton Latukha added 1 commit

    added 1 commit

    • 3e2df2e1 - bootstrap-haskell: create GHCUP_DIR

    Compare with previous version

  • True.

    Fixed that.

    Edited by Anton Latukha
  • Anton Latukha changed title from bootstrap-haskell: check GHCUP_DIR exists OR create it to bootstrap-haskell: create GHCUP_DIR

    changed title from bootstrap-haskell: check GHCUP_DIR exists OR create it to bootstrap-haskell: create GHCUP_DIR

  • Anton Latukha marked as a Work In Progress

    marked as a Work In Progress

  • Anton Latukha changed title from bootstrap-haskell: create GHCUP_DIR to WIP: (discussion) bootstrap-haskell: create GHCUP_DIR

    changed title from bootstrap-haskell: create GHCUP_DIR to WIP: (discussion) bootstrap-haskell: create GHCUP_DIR

  • Wait a second...

    GHCUP_DIR currently is ~/.local/ghcup. While XDG_DATA_HOME is ~/.local/share.

    In ~/.local there is allowed only 2 directories:

    1. bin - for executables.
    2. share - for everything else that is not config and not a cache.
    Edited by Anton Latukha
  • Anton Latukha added 1 commit

    added 1 commit

    • 67f59f68 - bootstrap-haskell: fx XDG GHCUP_DIR value

    Compare with previous version

  • Anton Latukha resolved all threads

    resolved all threads

  • Fixed that.

    Looked into ~/.local/share/ghcup - looks good.

    Edited by Anton Latukha
  • The savior of this situation is that in the XDG mode the script had the ~/.local/ghcup directory creation bug - so XDG installation was falling on that.

    So XDG installs had a blocker bug, so upstream migration from the ~/.local/ghcup to proper ~/.local/share/ghcup is light, because people were blocked from using it before.

    IDK how surrounding things hook-up into $GHCUP_DIR, a line for migration in the changelog/disclaimer in the readme may be still needed, I would just contribute the line into the changelog.

    Before all of this, I read the GHCUP changelog and populated the XDG info on the Arch Wiki, so the flow of people using XDG should increase soon. And that nobody opened a bug report is a great marker that people still not started using the feature.

    Edited by Anton Latukha
  • Anton Latukha added 1 commit

    added 1 commit

    • bbe2e876 - CHANGELOG.md: add note about `ghcup` directory fix`

    Compare with previous version

  • Anton Latukha unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Anton Latukha changed title from WIP: (discussion) bootstrap-haskell: create GHCUP_DIR to bootstrap-haskell: XDG: set proper GHCUP_DIR & create it

    changed title from WIP: (discussion) bootstrap-haskell: create GHCUP_DIR to bootstrap-haskell: XDG: set proper GHCUP_DIR & create it

  • I don't really like the XDG_DIRS thing in the first place. ghcup makes some assumptions about binary names and it's not entirely clear to me whether it won't accidentally delete a user binary that is similarly named when ppl put different things into ~/.local/bin.

  • merged

  • I wrote down some of my thoughts here #96

  • Please register or sign in to reply
    Loading