RSConnect can't find specific package version in private repo

We have a private repo where we publish internal packages and use tools::write_PACKAGES() to generate PACKAGES.rds. We are having issues with RSConnect not being able to find package versions that aren't the most current version. For example, we are trying to publish content that uses the oldsmobile package version 0.3.0.9000.8. The most recent version of the package is 0.3.0.9000.8. All versions of all of our packages are stored in the contrib directory of the repo. However, RSConnect is looking in contrib/Archive/oldsmobile because it's a non-current version of the package. I understand that this is how CRAN maintains historical versions of packages, but this "Archive" directory structure is not maintained/supported by tools::write_PACKAGES(), which is the "official" way to maintain a repo. Is there a way to tell RSConnect to look in contrib rather than Archive when searching for packages?

[Connect] 2021/05/07 18:25:46.872134075 Installing oldsmobile (0.3.0.9000.8) ... 
[Connect] 2021/05/07 18:25:47.052595729 curl: HTTP 200 http://my.cran.com/src/contrib/PACKAGES.rds
[Connect] 2021/05/07 18:25:47.400033334 curl: HTTP 200 http://my.repo.com/R/src/contrib/PACKAGES.rds
[Connect] 2021/05/07 18:25:47.484162529 curl: HTTP 200 http://my.repo.com/dev/R/src/contrib/PACKAGES.rds
[Connect] 2021/05/07 18:25:48.648273699 curl: HTTP 404 http://my.cran.com/src/contrib/Archive/oldsmobile/oldsmobile_0.3.0.9000.8.tar.gz
[Connect] 2021/05/07 18:25:48.648317932 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2021/05/07 18:25:49.723689329 curl: HTTP 404 http://my.cran.com/src/contrib/Archive/oldsmobile/oldsmobile_0.3.0.9000.8.tar.gz
[Connect] 2021/05/07 18:25:49.723701081 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2021/05/07 18:25:50.797209251 curl: HTTP 404 http://my.cran.com/src/contrib/Archive/oldsmobile/oldsmobile_0.3.0.9000.8.tar.gz
[Connect] 2021/05/07 18:25:50.797220441 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2021/05/07 18:25:51.872188101 curl: HTTP 404 http://my.cran.com/src/contrib/Archive/oldsmobile/oldsmobile_0.3.0.9000.8.tar.gz
[Connect] 2021/05/07 18:25:51.872198831 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2021/05/07 18:25:52.947018082 curl: HTTP 404 http://my.cran.com/src/contrib/Archive/oldsmobile/oldsmobile_0.3.0.9000.8.tar.gz
[Connect] 2021/05/07 18:25:52.947029383 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2021/05/07 18:25:54.020063874 curl: HTTP 404 http://my.repo.com/R/src/contrib/Archive/oldsmobile/oldsmobile_0.3.0.9000.8.tar.gz
[Connect] 2021/05/07 18:25:54.020084913 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2021/05/07 18:25:55.091127743 curl: HTTP 404 http://my.repo.com/R/src/contrib/Archive/oldsmobile/oldsmobile_0.3.0.9000.8.tar.gz
[Connect] 2021/05/07 18:25:55.091149354 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2021/05/07 18:25:56.163706518 curl: HTTP 404 http://my.repo.com/R/src/contrib/Archive/oldsmobile/oldsmobile_0.3.0.9000.8.tar.gz
[Connect] 2021/05/07 18:25:56.163719001 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2021/05/07 18:25:57.236468285 curl: HTTP 404 http://my.repo.com/R/src/contrib/Archive/oldsmobile/oldsmobile_0.3.0.9000.8.tar.gz
[Connect] 2021/05/07 18:25:57.236477283 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2021/05/07 18:25:58.308248410 curl: HTTP 404 http://my.repo.com/R/src/contrib/Archive/oldsmobile/oldsmobile_0.3.0.9000.8.tar.gz
[Connect] 2021/05/07 18:25:58.308261234 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2021/05/07 18:25:59.380247366 curl: HTTP 404 http://my.repo.com/dev/R/src/contrib/Archive/oldsmobile/oldsmobile_0.3.0.9000.8.tar.gz
[Connect] 2021/05/07 18:25:59.380267143 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2021/05/07 18:26:00.451648308 curl: HTTP 404 http://my.repo.com/dev/R/src/contrib/Archive/oldsmobile/oldsmobile_0.3.0.9000.8.tar.gz
[Connect] 2021/05/07 18:26:00.451659569 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2021/05/07 18:26:01.522648679 curl: HTTP 404 http://my.repo.com/dev/R/src/contrib/Archive/oldsmobile/oldsmobile_0.3.0.9000.8.tar.gz
[Connect] 2021/05/07 18:26:01.522659619 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2021/05/07 18:26:02.594285324 curl: HTTP 404 http://my.repo.com/dev/R/src/contrib/Archive/oldsmobile/oldsmobile_0.3.0.9000.8.tar.gz
[Connect] 2021/05/07 18:26:02.594297046 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2021/05/07 18:26:03.665560831 curl: HTTP 404 http://my.repo.com/dev/R/src/contrib/Archive/oldsmobile/oldsmobile_0.3.0.9000.8.tar.gz
[Connect] 2021/05/07 18:26:03.665571701 curl: (22) The requested URL returned error: 404 Not Found

Welcome to the community @wkdavis ! And well done tracing the details of this down!

Unfortunately I do not believe there is a way to do this today, although I will be happy to share this feedback with the product team!

In the meantime, have you looked into the drat package at all? It might make it easier to maintain your internal repository (it is a tool that I used to do the same once upon a time).

In particular, there is a drat::archivePackages() function that will create the archive for you.

The other tool I feel obligated to mention is RStudio Package Manager, which is the professional solution that we built to solve these types of use cases and make it easier to (e.g.) automatically build a package from its git sources, maintain the repository structure for you, etc.

Hopefully that helps! The benefit of maintaining a proper archive structure is that any tool that adheres to CRAN's standard (i.e. not just Connect) will be able to properly source older package versions!

Since we are not ready to acquire RStudio Package manager I just modified the deployment script for our packages to deploy to both src/contrib and src/contrib/Archive/{package}/.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.