File: fix_utils_resolve_for_debian.patch

package info (click to toggle)
r-cran-shiny 1.5.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,224 kB
  • sloc: javascript: 17,081; sh: 28; makefile: 21
file content (25 lines) | stat: -rw-r--r-- 1,107 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: Hack for symlinks to twitter-bootstrap and javascript
 Also allow serving /usr/share/javascript and
 /usr/share/twitter-boostrap/ from shiny apps by default
Author: Don Armstrong <don@debian.org>
Origin: vendor
Bug-Debian: https://bugs.debian.org/867963
Forwarded: not-needed
Last-Update: 2017-07-10
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/R/utils.R
+++ b/R/utils.R
@@ -288,6 +288,12 @@ resolve <- function(dir, relpath) {
   dir <- normalizePath(dir, winslash='/', mustWork=TRUE)
   # trim the possible trailing slash under Windows (#306)
   if (isWindows()) dir <- sub('/$', '', dir)
+  ## Debian specific hack for /usr/share/javascript symlinks
+  if (substr(abs.path,1,nchar('/usr/share/javascript/'))=='/usr/share/javascript/')
+      return(abs.path)
+  ## Debian specific hack for /usr/share/twitter-bootstrap symlinks
+  if (substr(abs.path,1,nchar('/usr/share/twitter-bootstrap/'))=='/usr/share/twitter-bootstrap/')
+      return(abs.path)
   if (nchar(abs.path) <= nchar(dir) + 1)
     return(NULL)
   if (substr(abs.path, 1, nchar(dir)) != dir ||