Skip to content

Commit 6f5d53d

Browse files
committed
Move rds creation to propagation step
1 parent 510bc70 commit 6f5d53d

File tree

6 files changed

+31
-67
lines changed

6 files changed

+31
-67
lines changed

3.20/bioc/bbscentral2/postrun.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ if [ -n "$BBS_OUTGOING_MAP" ]; then
3232
find OUTGOING -type d -exec chmod 755 {} \;
3333
$BBS_PYTHON_CMD $BBS_HOME/BBS-make-PROPAGATION_STATUS_DB.py
3434
chmod -R +r .
35-
$BBS_PYTHON_CMD $BBS_HOME/BBS-make-meta-dbs.py
3635
fi
3736

3837
# Generate the HTML report

3.21/bioc/bbscentral1/postrun.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ if [ -n "$BBS_OUTGOING_MAP" ]; then
3232
find OUTGOING -type d -exec chmod 755 {} \;
3333
$BBS_PYTHON_CMD $BBS_HOME/BBS-make-PROPAGATION_STATUS_DB.py
3434
chmod -R +r .
35-
$BBS_PYTHON_CMD $BBS_HOME/BBS-make-meta-dbs.py
3635
fi
3736

3837
# Generate the HTML report

BBS-make-meta-dbs.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

propagation/3.20/updateReposPkgs-bioc.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ update_repo "$MAC_BIG_SUR_arm64_CONTRIB" "mac.binary.big-sur-arm64" "tgz"
5858

5959
echo ""
6060

61+
echo ""
62+
echo "========================================================================"
63+
/bin/date
64+
echo "------------------------------------------------------------------------"
65+
66+
$Rscript -e "$META_R_EXPR; try(makeMetaDbs('$PROPAGATION_DB_FILE', '$REPOS_ROOT', '$META_SRC'))"
67+
68+
echo ""
69+
70+
6171
## FIXME: Why aren't manuals propagated based on the same criteria as source
6272
## packages? Looks like the former are propagated based on their timestamps
6373
## only (see below) while for source packages we use the more refined
@@ -68,13 +78,12 @@ MANUALS_DEST="$REPOS_ROOT/manuals"
6878
MANUALS_SRC="$BBS_OUTGOING_DIR/manuals"
6979
echo "Updating $BIOC_VERSION/bioc repo with reference manuals..."
7080
for i in `ls $MANUALS_SRC`; do
71-
pkg=`echo $i| awk '{split($0,a,".pdf"); print(a[1])}'`
81+
pkg=`echo $i| awk '{split($0,a,".(html|pdf)"); print(a[1])}'`
7282
mkdir -p $MANUALS_DEST/$pkg/man
7383
cp --update --verbose $MANUALS_SRC/$i $MANUALS_DEST/$pkg/man
7484
done
7585

7686
echo "Updating $SRC_CONTRIB with aliases and cross references dbs ..."
77-
META_SRC="$BBS_OUTGOING_DIR/Meta"
7887
cp --recursive --update --verbose $META_SRC $SRC_CONTRIB
7988

8089
echo "DONE."

propagation/3.21/updateReposPkgs-bioc.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ WIN_CONTRIB="$REPOS_ROOT/bin/windows/contrib/$R_VERSION"
1717
MAC_BIG_SUR_x86_64_CONTRIB="$REPOS_ROOT/bin/macosx/big-sur-x86_64/contrib/$R_VERSION"
1818
MAC_BIG_SUR_arm64_CONTRIB="$REPOS_ROOT/bin/macosx/big-sur-arm64/contrib/$R_VERSION"
1919

20+
META_SRC="$SRC_CONTRIB/Meta"
21+
META_R_EXPR="source('/home/biocbuild/BBS/utils/makeMetaDbs.R')"
22+
2023
if [ ! -f "$PROPAGATION_DB_FILE" ]; then
2124
echo "ERROR: $PROPAGATION_DB_FILE not found. Did postrun.sh run?"
2225
exit 1
@@ -58,6 +61,16 @@ update_repo "$MAC_BIG_SUR_arm64_CONTRIB" "mac.binary.big-sur-arm64" "tgz"
5861

5962
echo ""
6063

64+
echo ""
65+
echo "========================================================================"
66+
/bin/date
67+
echo "------------------------------------------------------------------------"
68+
69+
$Rscript -e "$META_R_EXPR; try(makeMetaDbs('$PROPAGATION_DB_FILE', '$REPOS_ROOT', '$META_SRC'))"
70+
71+
echo ""
72+
73+
6174
## FIXME: Why aren't manuals propagated based on the same criteria as source
6275
## packages? Looks like the former are propagated based on their timestamps
6376
## only (see below) while for source packages we use the more refined
@@ -74,7 +87,6 @@ for i in `ls $MANUALS_SRC`; do
7487
done
7588

7689
echo "Updating $SRC_CONTRIB with aliases and cross references dbs ..."
77-
META_SRC="$BBS_OUTGOING_DIR/Meta"
7890
cp --recursive --update --verbose $META_SRC $SRC_CONTRIB
7991

8092
echo "DONE."

utils/makeMetaDbs.R

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
makeMetaDbs <- function(outgoing_path, db_filepath) {
1+
makeMetaDbs <- function(db_filepath, repos_root, meta_path) {
22

33
meat_dir <- Sys.getenv("BBS_MEAT_PATH")
4-
bbs_central_rdir <- Sys.getenv("BBS_CENTRAL_RDIR")
5-
prop_status <- read.dcf(file.path(bbs_central_rdir, db_filepath))
4+
prop_status <- read.dcf(db_filepath)
65

76
pkgs <- c()
87
for (i in 1:dim(prop_status)[2]) {
@@ -13,26 +12,22 @@ makeMetaDbs <- function(outgoing_path, db_filepath) {
1312
}
1413
}
1514

16-
# Because the location is always recreated, we always create the Meta
17-
# directory and always create all the databases
18-
web_dir <- file.path(bbs_central_rdir, "web", "packages")
19-
meta_dir <- file.path(bbs_central_rdir, "OUTGOING", "Meta")
15+
web_dir <- file.path(repos_root "web", "packages")
16+
meta_dir <- file.path(meta_path)
2017
if (!dir.exists(meta_dir)) {
2118
dir.create(meta_dir, recursive = TRUE)
2219
}
2320

2421
pkg_paths <- file.path(meat_dir, pkgs)
2522
for (pkg_path in pkg_paths) {
26-
biocViews::build_db_from_source(pkg_path, bbs_central_rdir)
23+
biocViews::build_db_from_source(pkg_path, repos_root)
2724
}
2825

2926
aliases_db_file <- file.path(meta_dir, "aliases.rds")
30-
meta_aliases_db <- biocViews::build_meta_aliases_db(web_dir, aliases_db_file,
31-
TRUE)
27+
meta_aliases_db <- biocViews::build_meta_aliases_db(web_dir, aliases_db_file)
3228
saveRDS(meta_aliases_db, aliases_db_file, version = 2)
3329

3430
rdxrefs_db_file <- file.path(meta_dir, "rdxrefs.rds")
35-
meta_rdxrefs_db <- biocViews::build_meta_rdxrefs_db(web_dir, rdxrefs_db_file,
36-
TRUE)
31+
meta_rdxrefs_db <- biocViews::build_meta_rdxrefs_db(web_dir, rdxrefs_db_file)
3732
saveRDS(meta_rdxrefs_db, rdxrefs_db_file, version = 2)
3833
}

0 commit comments

Comments
 (0)