`sysreqs_install_plan` outputs partial dependency list for some platforms (with no warning)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Start with sysreqs_install_plan(), sysreqs_is_supported(), sysreqs_platforms(), and pak:::supported_os_versions(), using the OpenSUSE examples to trace how unsupported versions are classified. Compare the full-support and partial-support paths, then add coverage for the reported platforms and ensure the chosen behavior is an explanatory error or warning with an appropriate dependency result.
Written by the indexing model from the issue text.
Description
Here, "partially-supported platforms" appears to include supported OSs with versions that aren't in pak:::supported_os_versions() and OSs with an unsupported distribution (e.g., opensuse-tumbleweed) that, due to a very particular prefix, seems to end up being treated the same way.
pkgdepends::sysreqs_install_plan(
"sf",
config = list(sysreqs_platform = "opensuse-42.3")
)$packages$sysreq # includes proj sysreq --- the correct result
#> ℹ Loading metadata database
#> ✔ Loading metadata database ... done
#>
#> [1] "gdal" "geos" "openssl" "proj" "sqlite3"
pkgdepends::sysreqs_install_plan(
"sf",
config = list(sysreqs_platform = "opensuse-42.2")
)$packages$sysreq # excludes proj sysreq
#> [1] "gdal" "geos" "openssl" "sqlite3"
pkgdepends::sysreqs_install_plan(
"sf",
config = list(sysreqs_platform = "opensuse-tumbleweed-20240809")
)$packages$sysreq # aborts (but this doesn't seem to be what is used downstream)
#> Error in "sysreqs2_command(sysreqs_platform, \"update\")": ! Unknown OS. Don't know how to query or install system packages for
#> opensuse-tumbleweed-20240809.
pkgdepends::sysreqs_install_plan(
"sf",
config = list(sysreqs_platform = "x86_64-suse-linux-gnu-opensuse-tumbleweed-20240809")
)$packages$sysreq # excludes proj sysreq
#> [1] "gdal" "geos" "openssl" "sqlite3"
# extra setup info:
options("repos") # RSPM + CRAN; same sorts of things appear to happen also with CRAN only
#> $repos
#> RSPM
#> "https://packagemanager.rstudio.com/all/latest"
#> CRAN
#> "https://cran.rstudio.com/"
pkgdepends::current_r_platform()
#> [1] "x86_64-suse-linux-gnu-opensuse-tumbleweed-20240809"
pkgdepends::sysreqs_platforms()[9,] # opensuse-* --- but not all opensuse versions are fully supported
#> # A data frame: 1 × 7
#> name os distribution version update_command install_command query_command
#> * <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 openS… linux opensuse * <NA> zypper --non-i… rpm
pak:::supported_os_versions()$opensuse
#> [1] "42.3" "15.0"
pkgdepends::sysreqs_is_supported("opensuse-42.3") # "full" support
#> [1] TRUE
pkgdepends::sysreqs_is_supported("opensuse-42.2") # but actually has "partial" support
#> [1] TRUE
pkgdepends::sysreqs_is_supported("opensuse-tumbleweed-20240809") # unsupported, but this isn't what `pak` tries
#> [1] FALSE
pkgdepends::sysreqs_is_supported("x86_64-suse-linux-gnu-opensuse-tumbleweed-20240809") # but actually has "partial" support
#> [1] TRUE
Created on 2024-08-13 with reprex v2.1.1
[See also this comment for what looks like another downstream example involving redhat & units. I think this comment and my example above form a separate issue from pak#610 itself.]
Context
I was trying pak::pkg_install("sf") on OpenSUSE Tumbleweed, which fails with suboptimal feedback. (This could be improved downstream in pak by displaying or pointing to .Last.error$parent${stdout,stderr} rather than just .Last.error; in this case, stdout shows that there's an issue with using PROJ. But it seems that there's still something going amiss in pkgdepends underneath this.)
I'm not sure whether this is an instance of #320. I got the impression that it wasn't since it appeared to happen with both CRAN and CRAN+RSPM as repos, as well as both before and after successfully installing sf (with PROJ and other sysreqs).
Desired behavior
sysreqs_install_plan, when the platform isn't fully supported, will do one of the following:
- Explanatory hard error, potentially pointing to a hack like
Sys.setenv("PKG_SYSREQS_PLATFORM" = "opensuse-42.3") - Explanatory warning + current result
- Explanatory warning + use something like hack above, trying to grab dependency info from a fully-supported version
Hopefully, any of these would at least attach some additional useful context when things go wrong downstream, like in pak::pkg_install("sf") [though I haven't confirmed warnings/errors wouldn't somehow be swallowed and hidden away by pak].
- Dominant language
- C
- Stars
- 135
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from r-lib/pkgdepends
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
r-lib/pkgdepends#477 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
r-lib/pkgdepends#484 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
r-lib/pkgdepends#483 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
r-lib/pkgdepends#471 · 9 comments ·
All issues in r-lib/pkgdepends
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100