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

error in pkgplan_solve(self, private, match.arg(policy)) for base packages #597

Open
B0ydT opened this issue Feb 25, 2024 · 2 comments
Open
Labels
bug an unexpected problem or unintended behavior

Comments

@B0ydT
Copy link

B0ydT commented Feb 25, 2024

Hi,

I'm preparing a PR for another package, swapping from pkg_system_requirements to pkg_syqsreq (ThinkR-open/dockerfiler#68). I'm running into issues with base R packages, like stats and utils, as shown here:

> pak::pkg_sysreqs(pkg = "stats", sysreqs_platform = "centos-7")
✔ Updated metadata database: 5.16 MB in 6 files.                          
✔ Updating metadata database ... done                                     
Error:                                                                     
! error in pak subprocess
Caused by error in `pkgplan_solve(self, private, match.arg(policy))`:
! Error in dependency solver, cannot solve installation.
ℹ Solver status: -1.
ℹ This is an internal error in pkgdepends, please report an issue at <https://github.com/r-lib/pkgdepends/issues>.

I have searched the issues list and can't spot any similar issues. I've also tried multiple platforms and running the code on different computers with the same outcome.

I haven't used pak directly very much, so any insight into the problem and whether I can fix it on my end would be much appreciated 😊

@gaborcsardi gaborcsardi added the bug an unexpected problem or unintended behavior label Feb 25, 2024
@gaborcsardi
Copy link
Member

This is essentially this bug:

❯ pak::pkg_sysreqs(pkg = character(), sysreqs_platform = "centos-7")
Error:
! error in pak subprocess
Caused by error in `pkgplan_solve(self, private, match.arg(policy))`:
! Error in dependency solver, cannot solve installation.
ℹ Solver status: -1.
ℹ This is an internal error in pkgdepends, please report an issue at
  <https://github.com/r-lib/pkgdepends/issues>.
Type .Last.error to see the more details.

Base packages cannot be (re)installed and they do not have system requirements. As a workaround, you can drop base packages from your query and then handle empty queries specially.

@B0ydT
Copy link
Author

B0ydT commented Feb 26, 2024

Thanks, that makes total sense. I must have misread something because I was sure the old function produced system requirements, but of course it doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants