Skip to content

Install older pandoc will be overwritten by setup-r-dependencies System dependencies installation on Linux #710

Closed

Description

@cderv

In R Markdown ecosystem we are testing older pandoc version. This may not be a wide usage.

I was trying to understand why I lost pandoc-citeproc availability with 2.73 and 2.5 and it took me time to understand that using r-lib/actions/setup-r-dependencies@v2 will try to install pandoc from Ubuntu repo (which is currently version 2.9.2.1).

This will make any version installed with r-lib/actions/setup-pandoc@v2 in a step before to be installed over and make rmarkdown use this latest one, which is unexpected.

Opening this issue to share this problem. Don't know if there could be a solution. Several ideas:

  • not install pandoc in r-lib/actions/setup-r-dependencies@v2 with pak if already installed
  • Add as switch to opt-in a removal of Pandoc r-lib/actions/setup-r-dependencies@v2

Currently, our solution is to uninstall Pandoc after r-lib/actions/setup-r-dependencies@v2 and installing manually using the setup-pandoc action.

Activity

  1. added
    bug
    on Mar 20, 2023
  2. changed the title [-]Install older pandoc will be overwritten by setup-r-dependencies dependenciesi installation on Linux[/-] [+]Install older pandoc will be overwritten by setup-r-dependencies dependencies installation on Linux[/+] on Mar 20, 2023
  3. changed the title [-]Install older pandoc will be overwritten by setup-r-dependencies dependencies installation on Linux[/-] [+]Install older pandoc will be overwritten by setup-r-dependencies System dependencies installation on Linux[/+] on Mar 20, 2023
  4. gaborcsardi commented on Mar 20, 2023

    @gaborcsardi
    Member

    Yeah, I am not sure what we can do with this. Maybe we should switch to downloading pandoc from their GH releases, and install it in /usr/local/bin, then it will take priority over the DEB package.

  5. cderv commented on Mar 20, 2023

    @cderv
    ContributorAuthor

    Maybe we should switch to downloading pandoc from their GH releases, and install it in /usr/local/bin

    setup-pandoc already download from GH releases I believe.

    I am always suprised by pak installing Pandoc because this is a package requirement for running some tools. It is not needed for compilation like other tools.

    Maybe there is nothing to do and we can just document. This issue will happen for people using older pandoc than the one available in the Linux OS system repo. I acknowledge this is quite specific usage.

  6. gaborcsardi commented on Mar 20, 2023

    @gaborcsardi
    Member

    setup-pandoc already download from GH releases I believe.

    Yeah, sorry, I meant downloading the static linux binary, e.g. pandoc-3.1.1-linux-amd64.tar.gz and putting it in /usr/local/bin.

  7. cderv commented on Mar 20, 2023

    @cderv
    ContributorAuthor

    Oh I see. This way it could / would be put in PATH above the other one. That would probably solve the issue indeed.

  8. gaborcsardi commented on Feb 27, 2024

    @gaborcsardi
    Member

    This will be solved by the next r-lib/actions release, coming probably today. Now setup-pandoc installs a static binary of pandoc, and puts its path to the beginning of PATH, so it should take precedence over OS packages.

    So I am closing this now, but please reopen if you still have issues.

  9. github-actions commented on Mar 13, 2024

    @github-actions

    This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue

  10. locked as resolved and limited conversation to collaborators on Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions