summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install/Localconfig.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-10-24 02:33:30 +0200
committermkanat%bugzilla.org <>2007-10-24 02:33:30 +0200
commit212433f27ac422f79924d03b5d047236f6cdd308 (patch)
tree75f2acf6063b8fcc8b6739a0201a1447de778f6d /Bugzilla/Install/Localconfig.pm
parent9f8e0ce687bfc85339fc6c9ae3728e03527963b3 (diff)
downloadbugzilla-212433f27ac422f79924d03b5d047236f6cdd308.tar.gz
bugzilla-212433f27ac422f79924d03b5d047236f6cdd308.tar.xz
Bug 262269: A tool to auto-install missing perl packages on non-Windows systems
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner)
Diffstat (limited to 'Bugzilla/Install/Localconfig.pm')
-rw-r--r--Bugzilla/Install/Localconfig.pm43
1 files changed, 6 insertions, 37 deletions
diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm
index bfdb0ce94..7df9e0736 100644
--- a/Bugzilla/Install/Localconfig.pm
+++ b/Bugzilla/Install/Localconfig.pm
@@ -31,8 +31,10 @@ package Bugzilla::Install::Localconfig;
use strict;
use Bugzilla::Constants;
+use Bugzilla::Install::Util qw(bin_loc);
use Data::Dumper;
+use File::Basename qw(dirname);
use IO::File;
use Safe;
@@ -349,44 +351,11 @@ EOT
return { old_vars => \@old_vars, new_vars => \@new_vars };
}
-sub _get_default_cvsbin {
- return '' if ON_WINDOWS;
-
- my $cvs_executable = `which cvs`;
- if ($cvs_executable =~ /no cvs/ || $cvs_executable eq '') {
- # If which didn't find it, just set to blank
- $cvs_executable = "";
- } else {
- chomp $cvs_executable;
- }
- return $cvs_executable;
-}
-
-sub _get_default_interdiffbin {
- return '' if ON_WINDOWS;
-
- my $interdiff = `which interdiff`;
- if ($interdiff =~ /no interdiff/ || $interdiff eq '') {
- # If which didn't find it, just set to blank
- $interdiff = '';
- } else {
- chomp $interdiff;
- }
- return $interdiff;
-}
-
+sub _get_default_cvsbin { return bin_loc('cvs') }
+sub _get_default_interdiffbin { return bin_loc('interdiff') }
sub _get_default_diffpath {
- return '' if ON_WINDOWS;
-
- my $diff_binaries;
- $diff_binaries = `which diff`;
- if ($diff_binaries =~ /no diff/ || $diff_binaries eq '') {
- # If which didn't find it, set to blank
- $diff_binaries = "";
- } else {
- $diff_binaries =~ s:/diff\n$::;
- }
- return $diff_binaries;
+ my $diff_bin = bin_loc('diff');
+ return dirname($diff_bin);
}
1;