Bug 73031 - fix install

git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1184 6955db30-a419-402b-8a0d-67ecbb4d7f56
master
vfilippov 2010-12-20 17:58:19 +00:00
parent 71453f09de
commit f1bf017b59
3 changed files with 37 additions and 0 deletions

View File

@ -496,6 +496,7 @@ sub print_module_instructions {
sub _translate_feature {
my $features = shift;
$features = [$features] if !ref $features;
my @strings;
foreach my $feature (@$features) {
push(@strings, install_string("feature_$feature"));

31
contrib/autoinstall-patch Normal file
View File

@ -0,0 +1,31 @@
Add the following to beginning of checksetup.pl:
BEGIN { $SIG{__DIE__} = sub {
my ($a) = @_;
if ($a =~ /Can\'t locate (\S*).pm in/)
{
my $i = 0;
my @c;
while (@c = caller($i++))
{
if ($c[3] =~ /\(eval\)/)
{
die @_;
}
}
my $fn = $1.'.pm';
my $m = $1;
$m =~ s/\//::/gso;
print "Perl module '$m' is needed to run Bugzilla. Install it from CPAN? (Y/n) ";
my $k = <STDIN>;
if ($k || $k =~ /y|^\s*$/iso)
{
system("cpan '$m'");
exec("perl '$0' '".join("','", @ARGV)."'");
}
else
{
die @_;
}
}
}; }

View File

@ -23,6 +23,11 @@ my $OPTIONAL_MODULES =
version => '0.1',
feature => 'Import of OOXML Excel files (*.xlsx)',
},
{
package => 'Net-IP-Match-XS',
module => 'Net::IP::Match::XS',
feature => 'FOF-Sudo system-to-system authorization',
},
];
required_modules('custis', $REQUIRED_MODULES);