[Bps-public-commit] Module-Install-RTx branch, master, updated. 0.34_02-2-g7915614
Alex Vandiver
alexmv at bestpractical.com
Fri Jun 20 11:40:05 EDT 2014
The branch, master has been updated
via 7915614929a7a5373a50d40b811a18df4ad1972a (commit)
via a0cc3b1094f4e03cec20fa06a885ee7e084c7e84 (commit)
from 09ed813cd318ebdc45c2ef9fffb149022c8a0014 (commit)
Summary of changes:
Changes | 3 +++
META.yml | 4 ++--
lib/Module/Install/RTx.pm | 15 +++++++--------
lib/Module/Install/RTx/Runtime.pm | 12 +++++++-----
4 files changed, 19 insertions(+), 15 deletions(-)
- Log -----------------------------------------------------------------
commit a0cc3b1094f4e03cec20fa06a885ee7e084c7e84
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Jun 19 17:13:28 2014 -0400
Switch Module::Install::RTx::Runtime to no longer inherit from M::I
Inheriting from Module::Install means that, in the presence of a
inc/.author file, a BEGIN block is run that clears out inc/. This on
purpose, such that the updated Module::Install files can be copied in.
However, in the case of the runtime parts of Module::Install::RTx, this
meant that running "make initdb" (and now "make install") would clear
our inc/ if run as an author -- and replace them with the much smaller
set of dependencies that the runtime module needed.
Make Module::Install::RTx::Runtime truely runtime-only, by importing it
explicitly into inc/, and making it no longer inherit from
Module::Install.
diff --git a/lib/Module/Install/RTx.pm b/lib/Module/Install/RTx.pm
index 93702f0..7cd2ee1 100644
--- a/lib/Module/Install/RTx.pm
+++ b/lib/Module/Install/RTx.pm
@@ -89,11 +89,11 @@ lexicons ::
.
}
- $self->load('RTxPlugin');
+ $self->include('Module::Install::RTx::Runtime') if $self->admin;
$self->include_deps( 'YAML::Tiny', 0 ) if $self->admin;
my $postamble = << ".";
install ::
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxPlugin()"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Iinc -MModule::Install::RTx::Runtime -e"RTxPlugin()"
\t\$(NOECHO) \$(PERL) -MExtUtils::Install -e \"install({$args})\"
.
@@ -129,23 +129,22 @@ install ::
$self->makemaker_args( INSTALLSITEARCH => "$RT::LocalPath/man" );
if (%has_etc) {
- $self->load('RTxDatabase');
print "For first-time installation, type 'make initdb'.\n";
my $initdb = '';
$initdb .= <<"." if $has_etc{schema};
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxDatabase(qw(schema \$(NAME) \$(VERSION)))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Iinc -MModule::Install::RTx::Runtime -e"RTxDatabase(qw(schema \$(NAME) \$(VERSION)))"
.
$initdb .= <<"." if $has_etc{acl};
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxDatabase(qw(acl \$(NAME) \$(VERSION)))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Iinc -MModule::Install::RTx::Runtime -e"RTxDatabase(qw(acl \$(NAME) \$(VERSION)))"
.
$initdb .= <<"." if $has_etc{initialdata};
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxDatabase(qw(insert \$(NAME) \$(VERSION)))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Iinc -MModule::Install::RTx::Runtime -e"RTxDatabase(qw(insert \$(NAME) \$(VERSION)))"
.
$self->postamble("initdb ::\n$initdb\n");
$self->postamble("initialize-database ::\n$initdb\n");
if ($has_etc{upgrade}) {
print "To upgrade from a previous version of this extension, use 'make upgrade-database'\n";
- my $upgradedb = qq|\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxDatabase(qw(upgrade \$(NAME) \$(VERSION)))"\n|;
+ my $upgradedb = qq|\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Iinc -MModule::Install::RTx::Runtime -e"RTxDatabase(qw(upgrade \$(NAME) \$(VERSION)))"\n|;
$self->postamble("upgrade-database ::\n$upgradedb\n");
$self->postamble("upgradedb ::\n$upgradedb\n");
}
diff --git a/lib/Module/Install/RTx/Runtime.pm b/lib/Module/Install/RTx/Runtime.pm
index 8f22c4f..318e8c6 100644
--- a/lib/Module/Install/RTx/Runtime.pm
+++ b/lib/Module/Install/RTx/Runtime.pm
@@ -1,5 +1,7 @@
package Module::Install::RTx::Runtime;
-use Module::Install::Base; @ISA = qw(Module::Install::Base);
+
+use base 'Exporter';
+our @EXPORT = qw/RTxDatabase RTxPlugin/;
use strict;
use File::Basename ();
@@ -21,9 +23,9 @@ EOT
}
sub RTxDatabase {
- my ($self, $action, $name, $version) = @_;
+ my ($action, $name, $version) = @_;
- $self->_rt_runtime_load;
+ _rt_runtime_load();
require RT::System;
my $has_upgrade = RT::System->can('AddUpgradeHistory');
@@ -53,9 +55,9 @@ sub RTxDatabase {
}
sub RTxPlugin {
- my ($self, $name) = @_;
+ my ($name) = @_;
- $self->_rt_runtime_load;
+ _rt_runtime_load();
require YAML::Tiny;
my $data = YAML::Tiny::LoadFile('META.yml');
my $name = $data->{name};
commit 7915614929a7a5373a50d40b811a18df4ad1972a
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Jun 19 17:18:58 2014 -0400
Version 0.34_03 releng
diff --git a/Changes b/Changes
index d9a0690..e8cf804 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+0.34_03 2014-06-19
+ - Stop runtime code from clearing out inc/ if run as an author
+
0.34_02 2014-06-19
- Fix requires_rt_plugin
- Standardize error messages for rt_too_new and requires_rt
diff --git a/META.yml b/META.yml
index 5615c65..3d8fca8 100644
--- a/META.yml
+++ b/META.yml
@@ -21,7 +21,7 @@ no_index:
provides:
Module::Install::RTx:
file: lib/Module/Install/RTx.pm
- version: 0.34_02
+ version: 0.34_03
Module::Install::RTx::Runtime:
file: lib/Module/Install/RTx/Runtime.pm
requires:
@@ -29,4 +29,4 @@ requires:
perl: 5.8.0
resources:
license: http://opensource.org/licenses/mit-license.php
-version: 0.34_02
+version: 0.34_03
diff --git a/lib/Module/Install/RTx.pm b/lib/Module/Install/RTx.pm
index 7cd2ee1..076d18c 100644
--- a/lib/Module/Install/RTx.pm
+++ b/lib/Module/Install/RTx.pm
@@ -7,7 +7,7 @@ no warnings 'once';
use Module::Install::Base;
use base 'Module::Install::Base';
-our $VERSION = '0.34_02';
+our $VERSION = '0.34_03';
use FindBin;
use File::Glob ();
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list