X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trunk%2FR%2Fgetrpkg.R;h=266ee195a8cc7a3bd6044d8223ef18eed520aa56;hb=59285ed6284a13adc72fba3685acabfa23859ecf;hp=02266c4e9634d372d546ef3d55718b18a8f15d26;hpb=ff5fa2262544332700761a420bc4ceca9a11c7a2;p=cran2deb.git diff --git a/trunk/R/getrpkg.R b/trunk/R/getrpkg.R index 02266c4..266ee19 100644 --- a/trunk/R/getrpkg.R +++ b/trunk/R/getrpkg.R @@ -15,7 +15,7 @@ cleanup <- function(dir) { invisible() } -download_pkg <- function(dir, pkgname) { +download_pkg <- function(dir, pkgname, repacking=0) { # download pkgname into dir, and construct some metadata # record some basic information @@ -82,7 +82,8 @@ download_pkg <- function(dir, pkgname) { ,archive)) pkg$archive = archive # this is not a Debian conformant archive - pkg$need_repack = TRUE + ## we basically should never repack + ## pkg$need_repack = TRUE } return(pkg) } @@ -144,6 +145,12 @@ prepare_pkg <- function(dir, pkgname) { # if necessary, repack the archive into Debian-conformant format if (pkg$need_repack) { pkg <- repack_pkg(pkg) + } else { + log_system('ln','-sf',shQuote(pkg$archive), + shQuote(file.path(dirname(pkg$archive) + ,paste(pkg$srcname,'_' + ,pkg$version,'.orig.tar.gz' + ,sep='')))) } if (!file.info(pkg$path)[,'isdir']) { fail(pkg$path,'is not a directory and should be.')