New Upstream Snapshot - r-cran-askpass

Ready changes

Summary

Merged new upstream version: 1.1+git20211129.1.6d2f96d (was: 1.1).

Resulting package

Built on 2023-01-20T16:50 (took 6m32s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots r-cran-askpass-dbgsymapt install -t fresh-snapshots r-cran-askpass

Lintian Result

Diff

diff --git a/DESCRIPTION b/DESCRIPTION
index 00b1e63..add7efe 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
 Package: askpass
 Type: Package
-Title: Safe Password Entry for R, Git, and SSH
-Version: 1.1
+Title: Password Entry Utilities for R, Git, and SSH
+Version: 1.1.0
 Authors@R: person("Jeroen", "Ooms", role = c("aut", "cre"), 
     email = "jeroen@berkeley.edu", comment = c(ORCID = "0000-0002-4035-0289"))
 Description: Cross-platform utilities for prompting the user for credentials or a 
@@ -13,17 +13,15 @@ Description: Cross-platform utilities for prompting the user for credentials or
     Thereby the user can be prompted for credentials or a passphrase if needed 
     when R calls out to git or ssh.
 License: MIT + file LICENSE
-URL: https://github.com/jeroen/askpass#readme
-BugReports: https://github.com/jeroen/askpass/issues
+URL: https://github.com/r-lib/askpass
+BugReports: https://github.com/r-lib/askpass/issues
 Encoding: UTF-8
-LazyData: true
 Imports: sys (>= 2.1)
-RoxygenNote: 6.1.1
+RoxygenNote: 7.1.2
+Roxygen: list(markdown = TRUE)
 Suggests: testthat
 Language: en-US
 NeedsCompilation: yes
-Packaged: 2019-01-13 12:08:17 UTC; jeroen
+Packaged: 2023-01-20 16:47:35 UTC; root
 Author: Jeroen Ooms [aut, cre] (<https://orcid.org/0000-0002-4035-0289>)
 Maintainer: Jeroen Ooms <jeroen@berkeley.edu>
-Repository: CRAN
-Date/Publication: 2019-01-13 12:50:03 UTC
diff --git a/MD5 b/MD5
deleted file mode 100644
index 789bcaf..0000000
--- a/MD5
+++ /dev/null
@@ -1,17 +0,0 @@
-eb6f4d0b9cc61dfa08b3804779591d5f *DESCRIPTION
-98c71b5eae0ac8dabb055bd8883b8398 *LICENSE
-ad7ca63fdfe698661be582601697c491 *NAMESPACE
-53a778139c44afbdf7a33ef6f5df8705 *NEWS
-35412ba699bd625370487aa6a3e462c4 *R/askpass.R
-97259f0bad2d259cc87ad38a01dbf02e *R/onload.R
-a1624267f9c82ed814f980de8c5fbc66 *R/ssh.R
-1f9f6a06b0543cf62931f42ad291db6b *inst/WORDLIST
-a34602417af1b0c9ad06fc93df828c71 *inst/mac-askpass
-e0651808479eb9c747ffbd785441912b *inst/mac-simplepass
-0eb1bcf4a9936ace5ae19d962a2a56a7 *man/askpass.Rd
-20d01a60d6cef576ee14420f207d90d1 *man/ssh_askpass.Rd
-dce2a57c7c4f360319f3beaec3245444 *src/Makevars.win
-ff322a40812325235977b54323b67c91 *src/askpass.c
-b0e65f1a2fd9237f0cb01f9e2e6f64a4 *src/win32/win-askpass.c
-203e4bb2a5fd4caccb9a07d14bf48a90 *tests/testthat.R
-631ab61b3bc4600779d0eee8aaf6cb32 *tests/testthat/test-option.R
diff --git a/R/askpass.R b/R/askpass.R
index c8c7570..92343b8 100644
--- a/R/askpass.R
+++ b/R/askpass.R
@@ -5,6 +5,14 @@
 #' based on the user platform and front-end. Users or IDEs can override this
 #' and set a custom password entry function via the `askpass` option.
 #'
+#' By default `askpass()` returns `NULL` in non-interactive sessions.
+#' (These include knitr runs and testthat tests.)
+#' If you want to force a password prompt in non-interactive sessions,
+#' set the `rlib_interactive` option to `TRUE`:
+#' ```r
+#' options(rlib_interactive = TRUE)
+#' ```
+#'
 #' @export
 #' @param prompt the string printed when prompting the user for input.
 #' @examples \donttest{
@@ -17,7 +25,7 @@ askpass <- function(prompt = "Please enter your password: "){
 }
 
 ask_password_default <- function(prompt){
-  if(!interactive())
+  if(!is_interactive())
     return(NULL)
   if(is_windows()){
     askpass_windows(prompt)
diff --git a/R/interactive.R b/R/interactive.R
new file mode 100644
index 0000000..c0595e5
--- /dev/null
+++ b/R/interactive.R
@@ -0,0 +1,15 @@
+
+is_interactive <- function() {
+  opt <- getOption("rlib_interactive")
+  if (isTRUE(opt)) {
+    TRUE
+  } else if (identical(opt, FALSE)) {
+    FALSE
+  } else if (tolower(getOption("knitr.in.progress", "false")) == "true") {
+    FALSE
+  } else if (identical(Sys.getenv("TESTTHAT"), "true")) {
+    FALSE
+  } else {
+    interactive()
+  }
+}
diff --git a/debian/changelog b/debian/changelog
index 161c724..c0bbbc5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+r-cran-askpass (1.1+git20211129.1.6d2f96d-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Fri, 20 Jan 2023 16:47:41 -0000
+
 r-cran-askpass (1.1-2) unstable; urgency=medium
 
   * Standards-Version: 4.5.0 (routine-update)
diff --git a/man/askpass.Rd b/man/askpass.Rd
index ae55a90..a35aebf 100644
--- a/man/askpass.Rd
+++ b/man/askpass.Rd
@@ -15,6 +15,13 @@ By default, this function automatically uses the most appropriate method
 based on the user platform and front-end. Users or IDEs can override this
 and set a custom password entry function via the \code{askpass} option.
 }
+\details{
+By default \code{askpass()} returns \code{NULL} in non-interactive sessions.
+(These include knitr runs and testthat tests.)
+If you want to force a password prompt in non-interactive sessions,
+set the \code{rlib_interactive} option to \code{TRUE}:\if{html}{\out{<div class="sourceCode r">}}\preformatted{options(rlib_interactive = TRUE)
+}\if{html}{\out{</div>}}
+}
 \examples{
 \donttest{
 # Prompt user for passwd

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/lib/debug/.build-id/a9/1bebab90460f6471e0c06ad3e91d3493cab6b5.debug

Files in first set of .debs but not in second

-rw-r--r--  root/root   /usr/lib/debug/.build-id/98/62f5ac50a29fe4806fbc14916566a29faa3909.debug

Control files of package r-cran-askpass: lines which differ (wdiff format)

  • Depends: r-base-core (>= 4.1.3.20220413-2~jan+lint1), 4.2.0-1~jan+unchanged1), r-api-4.0, r-cran-sys (>= 2.1), libc6 (>= 2.2.5)

Control files of package r-cran-askpass-dbgsym: lines which differ (wdiff format)

  • Build-Ids: 9862f5ac50a29fe4806fbc14916566a29faa3909 a91bebab90460f6471e0c06ad3e91d3493cab6b5

More details

Full run details