[Bps-public-commit] Module-Install-RTx branch, upgrade-history, updated. 0.29-3-ge1c7b65

Kevin Falcone falcone at bestpractical.com
Wed Aug 15 19:09:43 EDT 2012


The branch, upgrade-history has been updated
       via  e1c7b65fd0c387476eefaf56ed293477a238cc54 (commit)
       via  58ae5635ea353abc071ba5860b55fadb0bac9d68 (commit)
      from  94dc971d77d35513b80340bd6c488bb42445c712 (commit)

Summary of changes:
 lib/Module/Install/RTx.pm         | 6 +++---
 lib/Module/Install/RTx/Factory.pm | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit 58ae5635ea353abc071ba5860b55fadb0bac9d68
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Aug 15 19:07:53 2012 -0400

    Without the \ you end up with $( interpolated into your Makefile
    
    Make gets *really* unhappy about that.

diff --git a/lib/Module/Install/RTx.pm b/lib/Module/Install/RTx.pm
index fff6d5f..538cd4e 100644
--- a/lib/Module/Install/RTx.pm
+++ b/lib/Module/Install/RTx.pm
@@ -163,13 +163,13 @@ dropdb ::
         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"RTxInitDB(qw(schema $(NAME) $(VERSION)))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(schema \$(NAME) \$(VERSION)))"
 .
         $initdb .= <<"." if $has_etc{acl};
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(acl $(NAME) $(VERSION)))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(acl \$(NAME) \$(VERSION)))"
 .
         $initdb .= <<"." if $has_etc{initialdata};
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(insert $(NAME) $(VERSION)))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(insert \$(NAME) \$(VERSION)))"
 .
         $self->postamble("initdb ::\n$initdb\n");
         $self->postamble("initialize-database ::\n$initdb\n");

commit e1c7b65fd0c387476eefaf56ed293477a238cc54
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Aug 15 19:08:26 2012 -0400

    Switch to checking for the method we want
    
    $RT::VERSION >= 4.2 fails for a few reasons (RT in dev, is still
    4.0.6-gSHA1, even once we release 4.1, that's less than 4.2 and using
    numeric comparison means you end up comparing only part of the number).
    If you switch to string comparison you get more fun, and no we're not
    using version objects.  For a walk down the scary things involved in
    comparing versions cleanly in RT, look at requires_rt.

diff --git a/lib/Module/Install/RTx/Factory.pm b/lib/Module/Install/RTx/Factory.pm
index c22ca63..b961bdc 100644
--- a/lib/Module/Install/RTx/Factory.pm
+++ b/lib/Module/Install/RTx/Factory.pm
@@ -22,6 +22,8 @@ sub RTxInitDB {
 
     RT::LoadConfig();
 
+    require RT::System;
+
     my $lib_path = File::Basename::dirname($INC{'RT.pm'});
     my @args = ("-Ilib");
     push @args, "-I$RT::LocalPath/lib" if $RT::LocalPath;
@@ -33,11 +35,9 @@ sub RTxInitDB {
         (($action eq 'insert') ? ("--datafile"    => "etc/initialdata") : ()),
         "--dba"         => $RT::DatabaseUser,
         "--prompt-for-dba-password" => '',
+        (RT::System->can('AddUpgradeHistory') ? ("--package" => $name, "--ext-version" => $version) : ()),
     );
 
-    push @args, ("--component" => $name, "--ext-version" => $version)
-      if $RT::VERSION >= 4.2;
-
     print "$^X @args\n";
     (system($^X, @args) == 0) or die "...returned with error: $?\n";
 }

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list