]> git.donarmstrong.com Git - cran2deb.git/commitdiff
sysreq: remove depth 2 nesting of brackets in comments.
authorblundellc <blundellc@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sat, 13 Sep 2008 13:20:27 +0000 (13:20 +0000)
committerblundellc <blundellc@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sat, 13 Sep 2008 13:20:27 +0000 (13:20 +0000)
perhaps should consider using some of the pcre operator here instead, if
it is common for nested brackets in comments. (does not appear to be so
far).

git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@75 edb9625f-4e0d-4859-8d74-9fd3b1da38cb

pkg/trunk/R/debcontrol.R

index 8ff18908e527254d90867b2f22a524b010ed3053..f6c14f9dcf8d8483f8960b1baf3833e2236664d2 100644 (file)
@@ -55,7 +55,9 @@ sysreqs_as_debian <- function(sysreq_text) {
         # constant case
         sysreq = tolower(sysreq)
         # drop version information/comments for now
-        sysreq = gsub('[\\([][^])]*[]\\)]','',sysreq)
+        sysreq = gsub('[[][^])]*[]]','',sysreq)
+        sysreq = gsub('\\([^)]*\\)','',sysreq)
+        sysreq = gsub('[[][^])]*[]]','',sysreq)
         sysreq = gsub('version','',sysreq)
         sysreq = gsub('from','',sysreq)
         sysreq = gsub('[<>=]*[[:space:]]*[[:digit:]]+[[:digit:].+:~-]*','',sysreq)