Reputation: 1135
I develop an R package, hosted on my own package repository. I have several stable versions and I can install them as expected:
install.packages("lib")
installs the latest version and if I want to install a prior version, I can always use install.packages("https://myrepo/lib_0.1.2.tar.gz")
.
I now want to publish beta releases to my repository. From https://combine-australia.github.io/r-pkg-dev/versioning.html, I understand that packages that have a "dev" component (the fourth number, e.g. 0.1.2.9000) should be considered unstable versions. I therefore expect them to be ignored when using install.packages("lib")
, but to be able to install them using install.packages("https://myrepo/lib_0.1.2.9000.tar.gz")
.
However, this is not the behavior I experience: if lib_0.1.1.tar.gz
and lib_0.1.2.9000.tar.gz
are published, install.packages("lib")
will install lib_0.1.2.9000.tar.gz
. Indeed, tools::write_PACKAGES
generates a PACKAGES file with version 0.1.2.9000, not 0.1.1 as I would expect. I know I could alter the PACKAGES file manually to include 0.1.1 instead of 0.1.2.9000, but I would like to use standard tools as much as possible.
Is there a way to make tools::write_PACKAGES
not list versions with a dev component? Or generate the PACKAGES files I expect with another standard tool?
Upvotes: 5
Views: 82