From 552bbb598bf43405327bb9da5336aa5edb8b5c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Fri, 8 Nov 2024 10:38:17 +0100 Subject: [PATCH] Update dev pkgdepends --- src/library/pkgdepends/DESCRIPTION | 2 +- src/library/pkgdepends/R/type-deps.R | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/library/pkgdepends/DESCRIPTION b/src/library/pkgdepends/DESCRIPTION index 9411c1a6d..d477f1e50 100644 --- a/src/library/pkgdepends/DESCRIPTION +++ b/src/library/pkgdepends/DESCRIPTION @@ -35,7 +35,7 @@ Config/testthat/edition: 3 Encoding: UTF-8 RoxygenNote: 7.3.2 NeedsCompilation: yes -Packaged: 2024-11-07 16:41:51 UTC; gaborcsardi +Packaged: 2024-11-08 09:37:25 UTC; gaborcsardi Author: Gábor Csárdi [aut, cre], Posit Software, PBC [cph, fnd] Maintainer: Gábor Csárdi diff --git a/src/library/pkgdepends/R/type-deps.R b/src/library/pkgdepends/R/type-deps.R index 45810bb52..9a05d25c1 100644 --- a/src/library/pkgdepends/R/type-deps.R +++ b/src/library/pkgdepends/R/type-deps.R @@ -14,7 +14,8 @@ parse_remote_deps <- function(specs, config, ...) { resolve_remote_deps <- function(remote, direct, config, cache, dependencies, ...) { - if (file.exists(file.path(remote$path, "DESCRIPTION"))) { + in_pkg <- tryCatch(find_package_root(remote$path), error = function(x) NULL) + if (!is.null(in_pkg)) { ret <- resolve_remote_local(remote, direct, config, cache, dependencies, ...) } else { @@ -67,6 +68,12 @@ resolve_remote_local_autodeps <- function(remote, direct, config, cache, dsc <- desc::desc("!new") hard <- deps$package[deps$type == "prod"] soft <- deps$package[deps$type != "prod"] + dsc$set( + Package = "localprojectautoscan", + Version = "1.0.0", + Title = "Local Project", + License = "Unknown" + ) for (p in hard) dsc$set_dep(p, type = "Depends") for (s in soft) dsc$set_dep(p, type = "Suggests") dsc$write(tmpdesc)