]> git.donarmstrong.com Git - cran2deb.git/commitdiff
rip bundles
authorblundellc <blundellc@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sun, 6 Jun 2010 19:00:54 +0000 (19:00 +0000)
committerblundellc <blundellc@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sun, 6 Jun 2010 19:00:54 +0000 (19:00 +0000)
git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@312 edb9625f-4e0d-4859-8d74-9fd3b1da38cb

trunk/R/debcontrol.R
trunk/R/debiannaming.R
trunk/R/debianpkg.R
trunk/R/getrpkg.R
trunk/R/rdep.R
trunk/R/version.R

index 9018a2dd3b47313e67eaf3875e4f478f1d27dbf2..a044f89ca4b041c0a8ed2f375fab9d898ef8bd13 100644 (file)
@@ -131,16 +131,6 @@ generate_control <- function(pkg) {
     }
     control[2,'Depends'] <- paste(pkg$depends$bin,collapse=', ')
 
-#   # bundles provide virtual packages of their contents
-#   # unnecessary for now; cran2deb converts R bundles itself
-#    if (pkg$is_bundle) {
-#        control[2,'Provides'] = paste(
-#                    lapply(r_bundle_contains(pkg$name)
-#                          ,function(name) return(pkgname_as_debian(paste(name)
-#                                                                  ,repopref=pkg$repo)))
-#                          ,collapse=', ')
-#    }
-
     # generate the description
     descr <- 'GNU R package "'
     if ('Title' %in% colnames(pkg$description)) {
@@ -148,11 +138,7 @@ generate_control <- function(pkg) {
     } else {
         descr <- paste(descr,pkg$name,sep='')
     }
-    if (pkg$is_bundle) {
-        long_descr <- pkg$description[1,'BundleDescription']
-    } else {
-        long_descr <- pkg$description[1,'Description']
-    }
+    long_descr <- pkg$description[1,'Description']
 
     if (length(long_descr) < 1 || long_descr == "") {
         # bypass lintian extended-description-is-empty for which we care not.
index 83c0ab58cf430782c2bb1e9c5b289832c4bd227e..7e07c9e6c40f2eeac4d3e03d41f4ff629163eaac 100644 (file)
@@ -28,12 +28,6 @@ pkgname_as_debian <- function(name,repopref=NULL,version=NULL,binary=T,build=F)
     } else {
         # XXX: data.frame rownames are unique, so always override repopref for
         #      now.
-        if (!(name %in% rownames(available))) {
-            bundle <- r_bundle_of(name)
-            if (!is.null(bundle)) {
-                name <- bundle
-            }
-        }
         debname = tolower(name)
         if (binary) {
             if (name %in% rownames(available)) {
index 63aaaddd7237786e9d8d31d2907d8bf71005ad01..e3656d31e8ae284133600aef506fe2db0a9ac618 100644 (file)
@@ -109,18 +109,7 @@ prepare_new_debian <- function(pkg,extra_deps) {
     # says: ``The sources and headers for the compiled code are in src, plus
     # optionally file Makevars or Makefile.'' It seems unlikely that
     # architecture independent code would end up here.
-    if (pkg$is_bundle) {
-        # if it's a bundle, check each of the packages
-        pkg$archdep = F
-        for (pkgname in r_bundle_contains(pkg$name)) {
-            pkg$archdep = file.exists(file.path(pkg$path,pkgname,'src'))
-            if (pkg$archdep) {
-                break
-            }
-        }
-    } else {
-        pkg$archdep = file.exists(file.path(pkg$path,'src'))
-    }
+    pkg$archdep = file.exists(file.path(pkg$path,'src'))
     pkg$arch <- 'all'
     if (pkg$archdep) {
         pkg$arch <- host_arch()
index b5e990f0bcc856275672fb44e41bff53b8b4456a..9c87c379460d28ecbc990241cb3fd287cadbd9e9 100644 (file)
@@ -117,19 +117,9 @@ repack_pkg <- function(pkg) {
 
 prepare_pkg <- function(dir, pkgname) {
     # download and extract an R package named pkgname
-    # OR the bundle containing pkgname
 
     # based loosely on library/utils/R/packages2.R::install.packages
 
-    # first a little trick; change pkgname if pkgname is contained in a bundle
-    if (!(pkgname %in% rownames(available))) {
-        bundle <- r_bundle_of(pkgname)
-        if (is.null(bundle)) {
-            fail('package',pkgname,'is unavailable')
-        }
-        pkgname <- bundle
-    }
-
     # grab the archive and some metadata
     pkg <- download_pkg(dir, pkgname)
 
@@ -167,10 +157,8 @@ prepare_pkg <- function(dir, pkgname) {
         }
     }
 
-    pkg$is_bundle = 'Bundle' %in% names(pkg$description[1,])
     # note subtly of short circuit operators (no absorption)
-    if ((!pkg$is_bundle && pkg$description[1,'Package'] != pkg$name) ||
-        ( pkg$is_bundle && pkg$description[1,'Bundle'] != pkg$name)) {
+    if (pkg$description[1,'Package'] != pkg$name) {
         fail('package name mismatch')
     }
     return(pkg)
index 8efaf454a1ff152254b8cc901f65a3eb44c0a61c..78c5d79bd97d401aa3e6cecc1b0e22e811ff6f2e 100644 (file)
@@ -1,37 +1,6 @@
 
-r_bundle_of <- function(pkgname) {
-    return(NULL) ## there are no more bundles as of R 2.11.0
-
-    ## -- old code below, never reached
-    ##
-    # returns the bundle containing pkgname or NA
-    bundles <- names(available[!is.na(available[, 'Bundle']), 'Contains'])
-    # use the first bundle
-    for (bundle in bundles) {
-        if (pkgname %in% r_bundle_contains(bundle)) {
-            return(bundle)
-        }
-    }
-    return(NULL)
-}
-
-r_bundle_contains <- function(bundlename) {
-    return(strsplit(available[bundlename,'Contains'],'[[:space:]]+')[[1]])
-}
 
 r_requiring <- function(names) {
-    #for (name in names) {
-    #    if (!(name %in% base_pkgs) && !(name %in% rownames(available))) {
-    #        bundle <- r_bundle_of(name)
-    #        if (!is.null(bundle)) {
-    #            name = bundle
-    #            names <- c(names,bundle)
-    #        }
-    #    }
-    #    if (name %in% rownames(available) && !is.na(available[name,'Contains'])) {
-    #        names <- c(names,r_bundle_contains(name))
-    #    }
-    #}
     # approximately prune first into a smaller availability
     candidates <- rownames(available)[sapply(rownames(available)
                                             ,function(name)
@@ -40,7 +9,7 @@ r_requiring <- function(names) {
     if (length(candidates) == 0) {
         return(c())
     }
-    # find a logical index into available of every package/bundle
+    # find a logical index into available of every package
     # whose dependency field contains at least one element of names.
     # (this is not particularly easy to read---sorry---but is much faster than
     # the alternatives i could think of)
@@ -71,13 +40,8 @@ r_dependencies_of <- function(name=NULL,description=NULL) {
     }
     if (is.null(description)) {
         if (!(name %in% rownames(available))) {
-            bundle <- r_bundle_of(name)
-            if (!is.null(bundle)) {
-                name <- bundle
-            } else {
-                # unavailable packages don't depend upon anything
-                return(data.frame())
-            }
+            # unavailable packages don't depend upon anything
+            return(data.frame())
         }
         description <- data.frame()
         # keep only the interesting fields
@@ -117,12 +81,6 @@ r_parse_dep_field <- function(dep) {
     }
     version = sub(pat,'\\3',dep)
     dep = sub(pat,'\\1',dep)
-    if (!(dep %in% rownames(available))) {
-        depb <- r_bundle_of(dep)
-        if (!is.null(depb)) {
-            dep <- depb
-        }
-    }
     return(list(name=dep,version=version))
 }
 
index 4094f4d77365644e9ae124eb7f36ac65282368d7..579523326d444e319bb0d33de14b3b59864e49eb 100644 (file)
@@ -75,11 +75,7 @@ version_update <- function(rver, prev_pkgver, prev_success) {
 
 new_build_version <- function(pkgname) {
     if (!(pkgname %in% rownames(available))) {
-        bundle <- r_bundle_of(pkgname)
-        if (is.null(bundle)) {
-            fail('tried to discover new version of',pkgname,'but it does not appear to be available')
-        }
-        name <- bundle
+        fail('tried to discover new version of',pkgname,'but it does not appear to be available')
     }
     db_ver <- db_latest_build_version(pkgname)
     db_succ <- db_latest_build_status(pkgname)[[1]]