aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2018-05-28 16:07:40 +0800
committerBenda Xu <heroxbd@gentoo.org>2018-05-28 16:07:40 +0800
commit9cbd621514659738f3a8943e4bde3d90c8febfc3 (patch)
tree0b781f35706c8b3528981cff33f1b867eaf72a7d
parentutil/fileio.py: do not skip the first line. (diff)
downloadR_overlay-9cbd621514659738f3a8943e4bde3d90c8febfc3.tar.gz
R_overlay-9cbd621514659738f3a8943e4bde3d90c8febfc3.tar.bz2
R_overlay-9cbd621514659738f3a8943e4bde3d90c8febfc3.zip
Only move source directory when needed.
This supports packages from outside CRAN. Fix typo in the last commit.
-rw-r--r--files/eclass/R-packages.eclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/files/eclass/R-packages.eclass b/files/eclass/R-packages.eclass
index 7d2afc6..5c3b66c 100644
--- a/files/eclass/R-packages.eclass
+++ b/files/eclass/R-packages.eclass
@@ -15,7 +15,9 @@ RDEPEND="${DEPEND}"
R-packages_src_unpack() {
unpack ${A}
- mv ${PN//_/.} ${P}
+ if [[ -d "${PN//_/.}" ]] && [[ ! -d "${P}" ]]; then
+ mv ${PN//_/.} ${P}
+ fi
}
R-packages_src_prepare() {
@@ -29,7 +31,7 @@ R-packages_src_compile() {
R-packages_src_install() {
insinto /usr/$(get_libdir)/R/site-library
- doins -r "${WORKDIR}"/${PN//_/.}y
+ doins -r "${WORKDIR}"/${PN//_/.}
}
R-packages_pkg_postinst() {