pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/pkgtools/R2pkg/files
Module Name: pkgsrc
Committed By: rillig
Date: Sat Oct 19 21:32:02 UTC 2019
Modified Files:
pkgsrc/pkgtools/R2pkg/files: R2pkg.R R2pkg_test.R
Log Message:
pkgtools/R2pkg: refactoring
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 pkgsrc/pkgtools/R2pkg/files/R2pkg.R
cvs rdiff -u -r1.19 -r1.20 pkgsrc/pkgtools/R2pkg/files/R2pkg_test.R
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/pkgtools/R2pkg/files/R2pkg.R
diff -u pkgsrc/pkgtools/R2pkg/files/R2pkg.R:1.24 pkgsrc/pkgtools/R2pkg/files/R2pkg.R:1.25
--- pkgsrc/pkgtools/R2pkg/files/R2pkg.R:1.24 Sat Oct 19 21:12:18 2019
+++ pkgsrc/pkgtools/R2pkg/files/R2pkg.R Sat Oct 19 21:32:02 2019
@@ -1,4 +1,4 @@
-# $NetBSD: R2pkg.R,v 1.24 2019/10/19 21:12:18 rillig Exp $
+# $NetBSD: R2pkg.R,v 1.25 2019/10/19 21:32:02 rillig Exp $
#
# Copyright (c) 2014,2015,2016,2017,2018,2019
# Brook Milligan. All rights reserved.
@@ -532,12 +532,6 @@ make.depends <- function(imps,deps)
use_languages <- function(imps, deps)
if (find.Rcpp(imps, deps)) 'c c++' else '# none'
-copy.description <- function(connection)
-{
- description <- readLines(connection)
- writeLines(description,con='DESCRIPTION')
-}
-
write.Makefile <- function(orig_mklines, metadata)
{
maintainer <- mklines.get_value(orig_mklines, 'MAINTAINER', arg.maintainer_email)
@@ -649,8 +643,6 @@ make.license <- function(df)
df
}
-make.r_pkgver <- function(df) element(df,'R_PKGVER','new_value')
-
find.order <- function(df,key,field)
{
x <- df[,key]
@@ -681,7 +673,7 @@ mklines.update_value <- function(df)
df$value[df$key == 'CATEGORIES'] <- make.categories(df)
df$value[df$key == 'MAINTAINER'] <- make.maintainer(df)
df$value[df$key == 'COMMENT'] <- make.comment(df)
- df$value[df$key == 'R_PKGVER'] <- make.r_pkgver(df)
+ df$value[df$key == 'R_PKGVER'] <- element(df, 'R_PKGVER', 'new_value')
df
}
@@ -747,12 +739,6 @@ conflicts <- function(pkg)
conflicts
}
-conflicts.order <- function(df)
-{
- order <- element(df,'COMMENT','order')
- order
-}
-
make.df.conflicts <- function(df,metadata)
{
df.conflicts <- data.frame()
@@ -760,8 +746,7 @@ make.df.conflicts <- function(df,metadat
if (!conflicts.exist)
{
c <- conflicts(metadata$Package)
- order <- conflicts.order(df)
- order <- order + 2.5
+ order <- element(df, 'COMMENT', 'order') + 2.5
i <- 0
for (conflict in c)
{
Index: pkgsrc/pkgtools/R2pkg/files/R2pkg_test.R
diff -u pkgsrc/pkgtools/R2pkg/files/R2pkg_test.R:1.19 pkgsrc/pkgtools/R2pkg/files/R2pkg_test.R:1.20
--- pkgsrc/pkgtools/R2pkg/files/R2pkg_test.R:1.19 Sat Oct 19 21:12:18 2019
+++ pkgsrc/pkgtools/R2pkg/files/R2pkg_test.R Sat Oct 19 21:32:02 2019
@@ -1,4 +1,4 @@
-# $NetBSD: R2pkg_test.R,v 1.19 2019/10/19 21:12:18 rillig Exp $
+# $NetBSD: R2pkg_test.R,v 1.20 2019/10/19 21:32:02 rillig Exp $
#
# Copyright (c) 2019
# Roland Illig. All rights reserved.
@@ -576,9 +576,6 @@ test_that('use_languages with Rcpp as de
expect_equal(languages, 'c c++')
})
-# test_that('copy.description', {
-# })
-
test_that('write.Makefile', {
tmpdir <- paste(tempdir(), 'category', 'pkgdir', sep = '/')
dir.create(tmpdir, recursive = TRUE)
@@ -701,9 +698,6 @@ test_that('make.license, old unknown, ne
expect_equal(updated$todo, '# TODO: ')
})
-# test_that('make.r_pkgver', {
-# })
-
test_that('find.order', {
mklines <- make_mklines(
'CATEGORIES=',
@@ -877,9 +871,6 @@ test_that('conflicts', {
list('CONFLICTS=\tR>=3.6.1', ''))
})
-# test_that('conflicts.order', {
-# })
-
# test_that('make.df.conflicts', {
# })
Home |
Main Index |
Thread Index |
Old Index