Hi,
I'm in the process of setting up tinderbox and have encountered some troubles.
Looking at the code, tinderbox uses `pkg info -qgO` but passes package names
when, according to pkg-info(8) """-O Search is done by the
origin.""". So, no need for different checks per requirement.
Another issue with the above approach is that it fails to match against perl-
threaded-5.14. [1]
I've attached a patch that fixes those issues for me.
Another issue is that, by default, the port installs databases/p5-DBD-mysql
which is not a recognised port. The attached patch fixes that [2].
Regards,
[1] I think pkgng is partially broken as it will succeed in matching pkg names
when using `-O`. Not sure what the expected behaviour is though.
[2] I assumed that databases/p5-DBD-mysqlXY needs to correspond to
databases/mysqlXY-client (no idea if that is a correct assumption).
Only in scripts: ds.ph
diff -ur /usr/local/tinderbox/scripts/lib/db-mysql.sh scripts/lib/db-mysql.sh
--- /usr/local/tinderbox/scripts/lib/db-mysql.sh 2013-01-17 17:56:19.0 +0200
+++ scripts/lib/db-mysql.sh 2013-01-18 07:42:32.0 +0200
@@ -24,8 +24,8 @@
#
# $MCom: portstools/tinderbox/lib/db-mysql.sh,v 1.8 2012/10/27 17:38:49 marcus Exp $
#
-export DB_MAN_PREREQS="databases/p5-DBD-mysql[456][0145]@p5-DBD-mysql[456][0145]-* databases/mysql[456][0145]-client@mysql[456][0145]-client-*"
-export DB_OPT_PREREQS="databases/php5-mysql@php5-mysql-* databases/php5-pdo_mysql@php5-pdo_mysql-*"
+export DB_MAN_PREREQS="databases/p5-DBD-mysql[456][0145] databases/mysql[456][0145]-client"
+export DB_OPT_PREREQS="databases/php5-mysql databases/php5-pdo_mysql"
if [ -n "${db_admin_pass}" ]; then
export DB_PROMPT='true'
diff -ur /usr/local/tinderbox/scripts/lib/db-pgsql.sh scripts/lib/db-pgsql.sh
--- /usr/local/tinderbox/scripts/lib/db-pgsql.sh 2013-01-17 17:56:19.0 +0200
+++ scripts/lib/db-pgsql.sh 2013-01-18 07:43:07.0 +0200
@@ -24,8 +24,8 @@
#
# $MCom: portstools/tinderbox/lib/db-pgsql.sh,v 1.9 2012/10/27 17:38:49 marcus Exp $
#
-export DB_MAN_PREREQS="databases/p5-DBD-Pg@p5-DBD-Pg-* databases/postgresql*-client@postgresql*-client-*"
-export DB_OPT_PREREQS="databases/php5-pgsql@php5-pgsql-* databases/php5-pdo_pgsql@php5-pdo_pgsql-*"
+export DB_MAN_PREREQS="databases/p5-DBD-Pg databases/postgresql*-client"
+export DB_OPT_PREREQS="databases/php5-pgsql databases/php5-pdo_pgsql"
if [ -n "${db_admin_pass}" ]; then
export PGPASSWORD=${db_admin_pass}
diff -ur /usr/local/tinderbox/scripts/lib/db-sqlite.sh scripts/lib/db-sqlite.sh
--- /usr/local/tinderbox/scripts/lib/db-sqlite.sh 2013-01-17 17:56:19.0 +0200
+++ scripts/lib/db-sqlite.sh 2013-01-18 07:41:45.0 +0200
@@ -1,5 +1,5 @@
-export DB_MAN_PREREQS="databases/sqlite3@sqlite3-* databases/p5-DBD-SQLite@p5-DBD-SQLite-*"
-export DB_OPT_PREREQS="databases/php5-pdo_sqlite@php5-pdo_sqlite-*"
+export DB_MAN_PREREQS="databases/sqlite3 databases/p5-DBD-SQLite"
+export DB_OPT_PREREQS="databases/php5-pdo_sqlite"
export DB_PROMPT=''
export DB_SCHEMA_LOAD='/usr/local/bin/sqlite3 -batch ${db_name} < "${schema_file}"'
diff -ur /usr/local/tinderbox/scripts/lib/tc_command.sh scripts/lib/tc_command.sh
--- /usr/local/tinderbox/scripts/lib/tc_command.sh 2013-01-17 17:56:19.0 +0200
+++ scripts/lib/tc_command.sh 2013-01-18 07:40:58.0 +0200
@@ -296,8 +296,8 @@
#---
Setup () {
-MAN_PREREQS="lang/perl5.[81]*@perl-5.[81]*"
-OPT_PREREQS="lang/php[45]@php[45]-* www/php[45]-session@php[45]-session* archivers/p5-Compress-Bzip2@p5-Compress-Bzip2-*"
+MAN_PREREQS="lang/perl5.[81]*"
+OPT_PREREQS="lang/php[45] www/php[45]-session archivers/p5-Compress-Bzip2"
PREF_FILES="tinderbox.ph"
README="$(tinderLoc scripts README)"
TINDERBOX_URL="http://tinderbox.marcuscom.com/";
diff -ur /usr/local/tinderbox/scripts/lib/tinderlib.sh scripts/lib/tinderlib.sh
--- /usr/local/tinderbox/scripts/lib/tinderlib.sh 2013-01-17 17:56:19.0 +0200
+++ scripts/lib/tinderlib.sh 2013-01-18 07:39:29.0 +0200
@@ -690,16 +690,14 @@
use_pkgng=$(make -f /usr/ports/Mk/bsd.port.mk -VWITH_PKGNG)
for r in ${reqs} ; do
- png_r=${r##*@}
- p_r=${r%%@*}
if [ -n "${use_pkgng}" ]; then
-if [ -z "$(pkg info -qgO ${png_r})" ]; then
-missing="${missing} ${png_r}"
+if [ -z "$(pkg info -qgO ${r})" ]; then
+missing="${missing} ${r}"
error=1
fi
else
-if [ -z "$(pkg_info -Q -O ${p_r})" ]; then
-missing="${missing} ${p_r}"
+if [ -z "$(pkg_info -Q -O ${r})" ]; then
+missing="${missing} ${r}"
error=1
fi
fi
Only in scripts: tinderbox
Only in scripts: tinderbox.ph
Only in scripts: tinderbox.ph.bak
--- Makefile.orig 2013-01-18 07:49:57.0 +0200
+++ Makefile 2013-01-18 07:50:17.0