[Rt-commit] rt branch, 4.4/insert-db-full-path, created. rt-4.4.3-68-g8c61476b5

Jim Brandt jbrandt at bestpractical.com
Fri Nov 30 11:49:48 EST 2018


The branch, 4.4/insert-db-full-path has been created
        at  8c61476b507b21d23e31bcbc7bee968131dfd0be (commit)

- Log -----------------------------------------------------------------
commit 8c61476b507b21d23e31bcbc7bee968131dfd0be
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Nov 30 11:44:17 2018 -0500

    Find full path for processing index files on upgrade
    
    Starting with perl 5.26, . (the current directory) is no
    longer in @INC by default, which causes upgrade steps that insert
    indexes to fail when RT::Handle tries to require the file.
    Set the full path so the indexes file can be found.

diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index eaf3d76e3..2ba78e494 100644
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -72,6 +72,7 @@ use strict;
 use warnings;
 
 use File::Spec;
+use Cwd;
 
 =head1 METHODS
 
@@ -587,6 +588,9 @@ sub InsertIndexes {
         }
     }
 
+    # Get the full path since . is no longer in @INC after perl 5.24
+    $path = Cwd::abs_path($path);
+
     local $@;
     eval { require $path; 1 }
         or return (0, "Couldn't execute '$path': " . $@);

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


More information about the rt-commit mailing list