On Thu, Apr 09, 2020 at 03:28:20AM +0000, wen heping wrote: > Hi, > > Here is a patch for databases/p5-DBIx-Class-Schema-Loader: > i) Update to 0.07049 > ii) Add devel/p5-curry as RUN_DEPENDS, I submitted the patch to create > devel/p5-curry yesterday. > iii) Add devel/p5-Test-Differences as TEST_DEPENDS > > It build well , and I tested it with mariadb, it failed 1/41 test > programs. 3/2135 subtests failed. > But it is not caused by this update. > > 4 ports depends on p5-DBIx-Class-Schema-Loader: > 1)databases/p5-DBICx-Sugar > 2) www/p5-Dancer2-Plugin-DBIC > 3) www/p5-MojoX-Session > All build well and pass the tests. > 4) databases/p5-Catalyst-Model-DBIC-Schema > It build well ,failed tests but not caused by this patch. > > Cheers ! > wen
Something struck me as odd about the *_DEPENDS, so I regenerated this update with portgen(1), and it confirmed my suspicion that there were extra bits. It does still need the new devel/p5-curry that's waiting for a second OK and being imported. While here, I cleaned up the DESCR and reworked the mysql+pg tests a bit to be a bit more like the ones in p5-DBIx-Class. I still left them as optional, but could remove the .if easily. Unfortunately, the mysql tests fail, not sure why, but it expects a scalar ref of \"current_timestamp" but actually *gets* the string, not a ref. I don't use that, so not quite sure if it's actually a problem. As was said, that wasn't caused by this update though, so apparently not a big deal. # Failed test ''default_value for function default' isa 'SCALAR'' # at t/lib/dbixcsl_common_tests.pm line 617. # 'default_value for function default' isn't a 'SCALAR' # Failed test 'default_value for function default is correct' # at t/lib/dbixcsl_common_tests.pm line 620. # Structures begin differing at: # $got = 'current_timestamp()' # $expected = SCALAR(0x18ec5f1c42f8) # Failed test 'test column col_timestamp_default_current_timestamp has definition: {data_type => "timestamp",datetime_undef_if_invalid => 1,default_value => "current_timestamp()"} expecting: {data_type => "ti mestamp",datetime_undef_if_invalid => 1,default_value => \"current_timestamp"}' # at t/lib/dbixcsl_common_tests.pm line 1422. # Structures begin differing at: # $got->{default_value} = 'current_timestamp()' # $expected->{default_value} = SCALAR(0x18ec4c6e4058) # Looks like you failed 3 tests of 380. t/10_02mysql_common.t ................... Dubious, test returned 3 (wstat 768, 0x300) Failed 3/380 subtests (less 15 skipped subtests: 362 okay) (1 TODO test unexpectedly succeeded) Comments? OK? Index: Makefile =================================================================== RCS file: /cvs/ports/databases/p5-DBIx-Class-Schema-Loader/Makefile,v retrieving revision 1.22 diff -u -p -r1.22 Makefile --- Makefile 12 Jul 2019 20:43:56 -0000 1.22 +++ Makefile 13 Apr 2020 00:38:11 -0000 @@ -4,63 +4,66 @@ COMMENT= dynamic definition of a DBIx::C MODULES= cpan PKG_ARCH= * -DISTNAME= DBIx-Class-Schema-Loader-0.07015 -REVISION= 1 +DISTNAME= DBIx-Class-Schema-Loader-0.07049 CATEGORIES= databases MAINTAINER= Andrew Fresh <afre...@openbsd.org> -# Artistic + GPL +# Perl PERMIT_PACKAGE= Yes -RUN_DEPENDS= databases/p5-DBIx-Class \ - databases/p5-DBIx-Class-IntrospectableM2M \ +RUN_DEPENDS= databases/p5-DBIx-Class>=0.08127 \ + devel/p5-curry>=1.0 \ devel/p5-Carp-Clan \ - devel/p5-Class-Unload \ - devel/p5-Data-Dump \ - devel/p5-List-MoreUtils \ - p5-Universal-exports-<0.05|p5-Universal-require->=0.11:devel/p5-Universal-require \ - textproc/p5-Lingua-EN-Inflect \ - textproc/p5-Lingua-EN-Inflect-Phrase \ - textproc/p5-Lingua-EN-Inflect-Number \ - textproc/p5-Lingua-EN-Tagger \ - textproc/p5-String-ToIdentifier-EN \ - textproc/p5-String-CamelCase - -BUILD_DEPENDS= ${RUN_DEPENDS} \ - databases/p5-DBD-SQLite \ - devel/p5-Test-Warn \ - devel/p5-Task-Weaken \ - devel/p5-Try-Tiny -TEST_DEPENDS=devel/p5-Config-Any \ - devel/p5-Config-General \ - databases/p5-DBD-SQLite \ - databases/p5-DBI \ - devel/p5-Moose \ - devel/p5-MooseX-MarkAsMethods \ - devel/p5-MooseX-NonMoose \ - devel/p5-Test-Exception \ - devel/p5-Test-Warn \ - devel/p5-namespace-autoclean + devel/p5-Class-Accessor-Grouped>=0.10008 \ + devel/p5-Class-C3-Componentised>=1.0008 \ + devel/p5-Class-Inspector>=1.27 \ + devel/p5-Class-Unload>=0.07 \ + devel/p5-Data-Dump>=1.06 \ + devel/p5-Hash-Merge>=0.12 \ + devel/p5-MRO-Compat>=0.09 \ + devel/p5-Scope-Guard>=0.20 \ + devel/p5-Try-Tiny \ + devel/p5-namespace-clean>=0.23 \ + textproc/p5-Lingua-EN-Inflect-Number>=1.1 \ + textproc/p5-Lingua-EN-Inflect-Phrase>=0.15 \ + textproc/p5-Lingua-EN-Tagger>=0.23 \ + textproc/p5-String-ToIdentifier-EN>=0.05 + +TEST_DEPENDS= databases/p5-DBD-SQLite>=1.29 \ + devel/p5-Test-Deep>=0.107 \ + devel/p5-Test-Differences>=0.60 \ + devel/p5-Test-Exception>=0.31 \ + devel/p5-Test-Warn>=0.21 MAKE_ENV= SCHEMA_LOADER_TESTS_BACKCOMPAT=Yes \ TEST_POD=Yes +DATABASE = dbic_schema_loader_test + TEST_PG ?= No .if ${TEST_PG:L:Myes} -MAKE_ENV += DBICTEST_PG_DSN='dbi:Pg:dbname=test;host=localhost' \ - DBICTEST_PG_USER=postgres \ - DBICTEST_PG_PASS= +MODULES += databases/postgresql TEST_DEPENDS += databases/p5-DBD-Pg +MODPOSTGRESQL_TEST_DBNAME = ${DATABASE} +TEST_ENV += DBICTEST_PG_DSN='dbi:Pg:dbname=${DATABASE}' \ + DBICTEST_PG_USER=${USER} \ + DBICTEST_PG_PASS=1 .endif TEST_MYSQL ?= No .if ${TEST_MYSQL:L:Myes} -MAKE_ENV += DBICTEST_MYSQL_DSN='dbi:mysql:database=test;host=localhost' \ +MODULES += databases/mariadb +TEST_DEPENDS += databases/p5-DBD-mysql +MODMARIADB_TEST_DBNAME = ${DATABASE} +MYSQL_DSN='dbi:mysql:database=${DATABASE};mysql_socket=${MODMARIADB_TEST_SOCKET}' +TEST_ENV += DBICTEST_MYSQL_DSN=${DSN} \ DBICTEST_MYSQL_USER=root \ - DBICTEST_MYSQL_PASS= \ + DBICTEST_MYSQL_PASS=1 \ DBICTEST_MYSQL_INNODB=1 -TEST_DEPENDS += databases/p5-DBD-mysql + +# In case we are testing both, we need: +MODPOSTGRESQL_TEST_CMD = ${MODMARIADB_TEST_TARGET} .endif .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/databases/p5-DBIx-Class-Schema-Loader/distinfo,v retrieving revision 1.8 diff -u -p -r1.8 distinfo --- distinfo 18 Jan 2015 03:13:02 -0000 1.8 +++ distinfo 13 Apr 2020 00:38:11 -0000 @@ -1,2 +1,2 @@ -SHA256 (DBIx-Class-Schema-Loader-0.07015.tar.gz) = JdPu2R5KXYru3urwHOjRVIDOa6R9rQFBT/3K/57LvPI= -SIZE (DBIx-Class-Schema-Loader-0.07015.tar.gz) = 192668 +SHA256 (DBIx-Class-Schema-Loader-0.07049.tar.gz) = 6GnN3hN4z+vM8imwzeWNJ0bcYIC3X1bQcqpfH852p2Q= +SIZE (DBIx-Class-Schema-Loader-0.07049.tar.gz) = 217280 Index: pkg/DESCR =================================================================== RCS file: /cvs/ports/databases/p5-DBIx-Class-Schema-Loader/pkg/DESCR,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 DESCR --- pkg/DESCR 5 Nov 2006 11:12:15 -0000 1.1.1.1 +++ pkg/DESCR 13 Apr 2020 00:38:11 -0000 @@ -1,7 +1,3 @@ DBIx::Class::Schema::Loader automates the definition of a -DBIx::Class::Schema by scanning table schemas and setting up columns and -primary keys. - -DBIx::Class::Schema::Loader currently supports only the DBI storage -type. It has explicit support for DBD::Pg, DBD::mysql, DBD::DB2, and -DBD::SQLite. Other DBI drivers may function. +DBIx::Class::Schema by scanning database table definitions and setting +up the columns, primary keys, unique constraints and relationships. Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/databases/p5-DBIx-Class-Schema-Loader/pkg/PLIST,v retrieving revision 1.4 diff -u -p -r1.4 PLIST --- pkg/PLIST 6 Apr 2012 09:59:14 -0000 1.4 +++ pkg/PLIST 13 Apr 2020 00:38:11 -0000 @@ -3,6 +3,7 @@ bin/dbicdump ${P5SITE}/DBIx/Class/Schema/Loader/ ${P5SITE}/DBIx/Class/Schema/Loader.pm ${P5SITE}/DBIx/Class/Schema/Loader/Base.pm +${P5SITE}/DBIx/Class/Schema/Loader/Column.pm ${P5SITE}/DBIx/Class/Schema/Loader/DBI/ ${P5SITE}/DBIx/Class/Schema/Loader/DBI.pm ${P5SITE}/DBIx/Class/Schema/Loader/DBI/ADO/ @@ -56,6 +57,7 @@ ${P5SITE}/DBIx/Class/Schema/Loader/Utils @man man/man1/dbicdump.1 @man man/man3p/DBIx::Class::Schema::Loader.3p @man man/man3p/DBIx::Class::Schema::Loader::Base.3p +@man man/man3p/DBIx::Class::Schema::Loader::Column.3p @man man/man3p/DBIx::Class::Schema::Loader::DBI.3p @man man/man3p/DBIx::Class::Schema::Loader::DBI::ADO.3p @man man/man3p/DBIx::Class::Schema::Loader::DBI::ADO::MS_Jet.3p