From d@tr7320 @ending from uni@@ydney@edu@@u  Wed Jul 25 04:00:09 2018
From: d@tr7320 @ending from uni@@ydney@edu@@u (Dario Strbenac)
Date: Wed, 25 Jul 2018 02:00:09 +0000
Subject: [Rd] Library lib.loc Option Ignored for Dependencies
In-Reply-To: <23383.4750.718313.873781@stat.math.ethz.ch>
References: <SYAPR01MB25584DFE469B02994EFBEA10CD520@SYAPR01MB2558.ausprd01.prod.outlook.com>
 <eebc4452-4bdb-d6d3-b438-dea208ab14b8@gmail.com>
 <23379.24722.804755.262952@stat.math.ethz.ch>
 <235f764d-fe20-e2cd-86a3-15bb14e0ca11@gmail.com>,
 <23383.4750.718313.873781@stat.math.ethz.ch>
Message-ID: <SYAPR01MB25586F58C0B6C49019D09F27CD540@SYAPR01MB2558.ausprd01.prod.outlook.com>

Good day,

A self-contained example which reproduces the problem is

packagesFolder <- tempdir()
latestFolder <- file.path(packagesFolder, "latest")
dir.create(latestFolder)

devtools::create(file.path(latestFolder, "statistics"), description = list(Version = "1.1.0", Depends = "extras (>= 1.0.5)"))
devtools::create(file.path(packagesFolder, "extras"), description = list(Version = "1.0.0"))
devtools::create(file.path(latestFolder, "extras"), description = list(Version = "1.1.0"))

latestInstall <- file.path(.libPaths()[1], "latest")
dir.create(latestInstall)
install.packages(file.path(packagesFolder, "extras"), type = "source", repos = NULL)
install.packages(file.path(latestFolder, "extras"), type = "source", repos = NULL, lib = latestInstall)
install.packages(file.path(latestFolder, "statistics"), type = "source", repos = NULL, lib = latestInstall)

> library(statistics, lib.loc = latestInstall)
  Error: package ?extras? 1.0.0 was found, but >= 1.0.5 is required by ?statistics?

The latest version of the statistics package is loaded, but the directory of latest packages is ignored by R when it considers the package dependency.

--------------------------------------
Dario Strbenac
University of Sydney
Camperdown NSW 2050
Australia


[Rd] Library lib.loc Option Ignored for Dependencies
Dario Strbenac