From: Peter Rabbitson Date: Wed, 23 Jul 2014 18:02:52 +0000 (+0200) Subject: Bundle trial SQLA for the trial of DBIC (reuse dq technique f4a8b21e) X-Git-Tag: v0.082800~115 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d0435d75;p=dbsrgits%2FDBIx-Class.git Bundle trial SQLA for the trial of DBIC (reuse dq technique f4a8b21e) Supersedes 609fa215, to be reverted before 0.082800 --- diff --git a/.gitignore b/.gitignore index c8cda3e..81d2445 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ t/var/ *~ maint/.Generated_Pod examples/Schema/db + +lib/DBIx/Class/_TempExtlib diff --git a/Makefile.PL b/Makefile.PL index eb1cb5b..e2de85e 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -15,6 +15,40 @@ BEGIN { $Module::Install::AUTHOR = 0 if (grep { $ENV{"PERL5_${_}_IS_RUNNING"} } (qw/CPANM CPANPLUS CPAN/) ); } +## +## TEMPORARY (and non-portable) +## Get trial SQLA +## +BEGIN { + my $target_libdir = 'lib/DBIx/Class/_TempExtlib'; + + if ( ($Module::Install::AUTHOR or $ENV{TRAVIS}) and ! $ENV{MAKELEVEL} ) { + + `rm -rf $target_libdir`; + `mkdir $target_libdir`; + for ( + [ 'SQL-Abstract' => 'master' ], + ) { + my $tdir = "/tmp/dbictemplib/$_->[0]/"; + + `rm -rf $tdir`; + + `GIT_SSH=maint/careless_ssh.bash git clone --bare --quiet --branch=$_->[1] --depth=1 git://git.shadowcat.co.uk/dbsrgits/$_->[0] $tdir`; + printf "\nIncluding %s git rev %s\n", + $_->[0], + scalar `GIT_DIR=$tdir git rev-parse $_->[1]`, + ; + `git archive --format=tar --remote=file://$tdir $_->[1] lib/ | tar --strip-components=1 -xC $target_libdir`; + + #`rm -rf $tdir`; + } + + unshift @INC, $target_libdir; + + no_index directory => $target_libdir; + } +} + homepage 'http://www.dbix-class.org/'; resources 'x_IRC' => 'irc://irc.perl.org/#dbix-class'; resources 'x_WebIRC' => 'https://chat.mibbit.com/#dbix-class@irc.perl.org'; @@ -85,7 +119,7 @@ my $runtime_requires = { 'namespace::clean' => '0.24', 'Path::Class' => '0.18', 'Scope::Guard' => '0.03', - 'SQL::Abstract' => '1.78_02', # TEMPORARY + 'SQL::Abstract' => '1.78', 'Try::Tiny' => '0.07', # Technically this is not a core dependency - it is only required diff --git a/lib/DBIx/Class/_Util.pm b/lib/DBIx/Class/_Util.pm index 83bca47..35f8ad0 100644 --- a/lib/DBIx/Class/_Util.pm +++ b/lib/DBIx/Class/_Util.pm @@ -4,6 +4,34 @@ package # hide from PAUSE use warnings; use strict; +# Temporary - tempextlib +use namespace::clean; +BEGIN { + require Module::Runtime; + require File::Spec; + + # There can be only one of these, make sure we get the bundled part and + # *not* something off the site lib + for (qw( + DBIx::Class::SQLMaker + SQL::Abstract + SQL::Abstract::Test + )) { + if ($INC{Module::Runtime::module_notional_filename($_)}) { + die "\nUnable to continue - a part of the bundled templib contents " + . "was already loaded (likely an older version from CPAN). " + . "Make sure that @{[ __PACKAGE__ ]} is loaded before $_\n\n" + ; + } + } + + our ($HERE) = File::Spec->rel2abs( + File::Spec->catdir( (File::Spec->splitpath(__FILE__))[1], '_TempExtlib' ) + ) =~ /^(.*)$/; # screw you, taint mode + + unshift @INC, $HERE; +} + use constant SPURIOUS_VERSION_CHECK_WARNINGS => ($] < 5.010 ? 1 : 0); BEGIN { diff --git a/maint/careless_ssh.bash b/maint/careless_ssh.bash new file mode 100755 index 0000000..1b9e0bc --- /dev/null +++ b/maint/careless_ssh.bash @@ -0,0 +1,3 @@ +#!/bin/bash + +/usr/bin/ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$@" diff --git a/maint/travis-ci_scripts/30_before_script.bash b/maint/travis-ci_scripts/30_before_script.bash index eb642a8..6aadca4 100755 --- a/maint/travis-ci_scripts/30_before_script.bash +++ b/maint/travis-ci_scripts/30_before_script.bash @@ -107,7 +107,7 @@ else parallel_installdeps_notest Test::Warn B::Hooks::EndOfScope Test::Differences HTTP::Status parallel_installdeps_notest Test::Pod::Coverage Test::EOL Devel::GlobalDestruction Sub::Name MRO::Compat Class::XSAccessor URI::Escape HTML::Entities parallel_installdeps_notest YAML LWP Class::Trigger JSON::XS DateTime::Format::Builder Class::Accessor::Grouped Package::Variant - parallel_installdeps_notest 'SQL::Abstract@1.78_02' Moose Module::Install JSON SQL::Translator File::Which + parallel_installdeps_notest SQL::Abstract Moose Module::Install JSON SQL::Translator File::Which if [[ -n "$DBICTEST_FIREBIRD_INTERBASE_DSN" ]] ; then # the official version is very much outdated and does not compile on 5.14+ @@ -127,9 +127,6 @@ if [[ "$CLEANTEST" = "true" ]]; then # we may need to prepend some stuff to that list HARD_DEPS="$(echo $(make listdeps))" - # temporary - HARD_DEPS="R/RI/RIBASUSHI/SQL-Abstract-1.78_02.tar.gz $HARD_DEPS" - ##### TEMPORARY WORKAROUNDS needed in case we will be using CPAN.pm if [[ "$DEVREL_DEPS" != "true" ]] && ! CPAN_is_sane ; then # combat dzillirium on harness-wide level, otherwise breakage happens weekly diff --git a/t/53lean_startup.t b/t/53lean_startup.t index 27a4dd4..0745b34 100644 --- a/t/53lean_startup.t +++ b/t/53lean_startup.t @@ -108,6 +108,9 @@ BEGIN { Class::Accessor::Grouped Class::C3::Componentised SQL::Abstract + + Module::Runtime + File::Spec )); require DBICTest::Schema; diff --git a/xt/podcoverage.t b/xt/podcoverage.t index a16a365..dff0acf 100644 --- a/xt/podcoverage.t +++ b/xt/podcoverage.t @@ -114,6 +114,8 @@ my $exceptions = { /] }, + 'DBIx::Class::_TempExtlib*' => { skip => 1 }, + 'DBIx::Class::Admin::*' => { skip => 1 }, 'DBIx::Class::ClassResolver::PassThrough' => { skip => 1 }, 'DBIx::Class::Componentised' => { skip => 1 },