You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using some of the deb packages built through this repo on Debian unstable. I believe that this is not an officially supported OS, so you might not want to act on this, however the fix looks to be straightforward.
The underlying issue is related to /etc/os-release: in Debian unstable and testing, the VERSION and VERSION_ID variables (which are optional) are removed until close to the next release date.
The result when using the R package on such a system is:
> getOption("HTTPUserAgent")
character(0)
which violates expectations of downstream packages such as renv which assume that HTTPUserAgent is either NULL or a nonempty character vector. (renv is rendered completely unable to install packages, which is how I noticed this issue.)
This is related to the following lines inserted by the build script into Rprofile (as of #34):
When the VERSION_ID is missing from /etc/os-release, grep("^VERSION_ID=", os, value = TRUE) returns character(0), which then "infects" the rest of this section including HTTPUserAgent:
Proposed fix: in the above lines, if version is equal to character(0), either set it to some dummy value (e.g. "0"), or make sure that HTTPUserAgent is set to NULL in this case.
The text was updated successfully, but these errors were encountered:
arcresu
changed the title
HTTPUserAgent is set to empty character vector on future Debian releases
HTTPUserAgent is set to empty character vector on Debian testing/unstable
Jan 9, 2024
I am using some of the deb packages built through this repo on Debian unstable. I believe that this is not an officially supported OS, so you might not want to act on this, however the fix looks to be straightforward.
The underlying issue is related to
/etc/os-release
: in Debian unstable and testing, theVERSION
andVERSION_ID
variables (which are optional) are removed until close to the next release date.The result when using the R package on such a system is:
which violates expectations of downstream packages such as
renv
which assume thatHTTPUserAgent
is eitherNULL
or a nonempty character vector. (renv
is rendered completely unable to install packages, which is how I noticed this issue.)This is related to the following lines inserted by the build script into Rprofile (as of #34):
r-builds/builder/build.sh
Lines 183 to 195 in 5532edb
When the
VERSION_ID
is missing from/etc/os-release
,grep("^VERSION_ID=", os, value = TRUE)
returnscharacter(0)
, which then "infects" the rest of this section includingHTTPUserAgent
:Proposed fix: in the above lines, if
version
is equal tocharacter(0)
, either set it to some dummy value (e.g."0"
), or make sure thatHTTPUserAgent
is set toNULL
in this case.The text was updated successfully, but these errors were encountered: