Closed klmr closed 1 year ago
I've got a local package with the following DESCRIPTION file (excerpt):
DESCRIPTION
Imports: rtdep Remotes: git::https://internal-gitlab.host/group/remotes-test-dependency.git
Note that the GitLab repository name of that package differs from the package name.
When trying to install the package dependencies via pak::pak() (or pak::local_install_deps()), I am getting the following error message:
pak::pak()
pak::local_install_deps()
✔ Loading metadata database ... done Error: ! error in pak subprocess Caused by error: ! Could not solve package dependencies: * deps::/full-path-to/package: Can't install dependency rtdep * rtdep: Can't find package called rtdep.
However, installing the same package dependencies via remotes::install_deps() works:
remotes::install_deps()
Skipping 1 packages not available: rtdep Downloading git repo https://internal-gitlab.host/group/remotes-test-dependency.git ── R CMD build ───────────────────────────────────────────────────────────────────── ✔ checking for file ‘/tmp/RtmpVDxFNm/file35f4bb48f50b42/DESCRIPTION’ (436ms) ─ preparing ‘rtdep’: ✔ checking DESCRIPTION meta-information ... … * installing *source* package ‘rtdep’ ... … * DONE (rtdep)
Renaming the GitLab repo to https://internal-gitlab.host/group/rtdep.git fixes the issue, but is not unfortunately not generally possible for us.
https://internal-gitlab.host/group/rtdep.git
You need to specify the package name, see https://pak.r-lib.org/reference/pak_package_sources.html#package-names
Oh, awesome! 🎉
I've got a local package with the following
DESCRIPTION
file (excerpt):Note that the GitLab repository name of that package differs from the package name.
When trying to install the package dependencies via
pak::pak()
(orpak::local_install_deps()
), I am getting the following error message:However, installing the same package dependencies via
remotes::install_deps()
works:Renaming the GitLab repo to
https://internal-gitlab.host/group/rtdep.git
fixes the issue, but is not unfortunately not generally possible for us.