]> git.donarmstrong.com Git - cran2deb.git/blobdiff - trunk/R/debcontrol.R
drop empty sysreqs
[cran2deb.git] / trunk / R / debcontrol.R
index 1cadc7ac03645d670bedaf51afaf648a93bf04df..743aa0085b7707c39dda92f6139572b571cd0dd7 100644 (file)
@@ -80,6 +80,10 @@ sysreqs_as_debian <- function(sysreq_text) {
         sysreq = gsub('(ht|f)tps?://[[:alnum:]!?*"\'(),%$_@.&+/=-]*','',sysreq)
         # squish out space
         sysreq = chomp(gsub('[[:space:]]+',' ',sysreq))
+        if (nchar(sysreq) == 0) {
+            notice('part of the SystemRequirement became nothing')
+            next
+        }
         alias <- db_sysreq_override(sysreq)
         if (is.null(alias)) {
             error('do not know what to do with SystemRequirement:',sysreq)
@@ -149,7 +153,7 @@ generate_control <- function(pkg) {
         long_descr <- pkg$description[1,'Description']
     }
 
-    if (length(long_descr) < 1) {
+    if (length(long_descr) < 1 || long_descr == "") {
         # bypass lintian extended-description-is-empty for which we care not.
         long_descr <- paste('The author/maintainer of this package'
                            ,'did not care to enter a longer description.')