[Bps-public-commit] Module-Install-RTx branch, master, updated. 0.34_04-3-g85dd93e

Alex Vandiver alexmv at bestpractical.com
Mon Jul 14 12:06:17 EDT 2014


The branch, master has been updated
       via  85dd93e894aced3bdbf29f8ae74c8e7f96dac0b8 (commit)
       via  cad124051ec4952cd415e1624a0faf73e3df5970 (commit)
       via  c162858aac805c9ac2f4ca1564e358578a7103e9 (commit)
      from  d11a68104130b178b69ceb3f3ca7cfd937b17a7b (commit)

Summary of changes:
 lib/Module/Install/RTx.pm | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit c162858aac805c9ac2f4ca1564e358578a7103e9
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Jul 14 11:58:44 2014 -0400

    Apply the same transformations to RTHOME as at the prompt, and generalize

diff --git a/lib/Module/Install/RTx.pm b/lib/Module/Install/RTx.pm
index 0b5d7f5..1148d2d 100644
--- a/lib/Module/Install/RTx.pm
+++ b/lib/Module/Install/RTx.pm
@@ -35,6 +35,8 @@ sub RTx {
 
     # Try to find RT.pm
     my @prefixes = qw( /opt /usr/local /home /usr /sw );
+    $ENV{RTHOME} =~ s{/RT\.pm$}{} if defined $ENV{RTHOME};
+    $ENV{RTHOME} =~ s{/lib/?$}{}  if defined $ENV{RTHOME};
     my @try = $ENV{RTHOME} ? ($ENV{RTHOME}, "$ENV{RTHOME}/lib") : ();
     while (1) {
         my @look = @INC;
@@ -46,8 +48,9 @@ sub RTx {
         warn
             "Cannot find the location of RT.pm that defines \$RT::LocalPath in: @look\n";
         $_ = $self->prompt("Path to directory containing your RT.pm:") or exit;
-        $_ =~ s{(/lib)?/RT\.pm$}{};
-        @try = ("$_/rt4/lib", "$_/lib/rt4", "$_/lib");
+        $_ =~ s{/RT\.pm$}{};
+        $_ =~ s{/lib/?$}{};
+        @try = ($_, "$_/lib");
     }
 
     print "Using RT configuration from $INC{'RT.pm'}:\n";

commit cad124051ec4952cd415e1624a0faf73e3df5970
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Jul 14 12:04:25 2014 -0400

    Switch away from using $_, for clarity

diff --git a/lib/Module/Install/RTx.pm b/lib/Module/Install/RTx.pm
index 1148d2d..c2efab0 100644
--- a/lib/Module/Install/RTx.pm
+++ b/lib/Module/Install/RTx.pm
@@ -47,10 +47,10 @@ sub RTx {
 
         warn
             "Cannot find the location of RT.pm that defines \$RT::LocalPath in: @look\n";
-        $_ = $self->prompt("Path to directory containing your RT.pm:") or exit;
-        $_ =~ s{/RT\.pm$}{};
-        $_ =~ s{/lib/?$}{};
-        @try = ($_, "$_/lib");
+        my $given = $self->prompt("Path to directory containing your RT.pm:") or exit;
+        $given =~ s{/RT\.pm$}{};
+        $given =~ s{/lib/?$}{};
+        @try = ($given, "$given/lib");
     }
 
     print "Using RT configuration from $INC{'RT.pm'}:\n";

commit 85dd93e894aced3bdbf29f8ae74c8e7f96dac0b8
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Jul 14 12:06:00 2014 -0400

    Add the debian default install directory
    
    This allows modules to install cleanly on Debian/Ubuntu-based rt4
    installs with no prompting.

diff --git a/lib/Module/Install/RTx.pm b/lib/Module/Install/RTx.pm
index c2efab0..8922526 100644
--- a/lib/Module/Install/RTx.pm
+++ b/lib/Module/Install/RTx.pm
@@ -34,7 +34,7 @@ sub RTx {
     $self->add_metadata("x_module_install_rtx_version", $VERSION );
 
     # Try to find RT.pm
-    my @prefixes = qw( /opt /usr/local /home /usr /sw );
+    my @prefixes = qw( /opt /usr/local /home /usr /sw /usr/share/request-tracker4);
     $ENV{RTHOME} =~ s{/RT\.pm$}{} if defined $ENV{RTHOME};
     $ENV{RTHOME} =~ s{/lib/?$}{}  if defined $ENV{RTHOME};
     my @try = $ENV{RTHOME} ? ($ENV{RTHOME}, "$ENV{RTHOME}/lib") : ();

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


More information about the Bps-public-commit mailing list