Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
cabe5381
Commit
cabe5381
authored
Apr 24, 2011
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 648178: Make install-module.pl check if a compiler is available
and fail with a clear error if not. r=glob, a=mkanat
parent
f0129cf8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletion
+37
-1
CPAN.pm
Bugzilla/Install/CPAN.pm
+23
-0
Util.pm
Bugzilla/Install/Util.pm
+7
-1
strings.txt.pl
template/en/default/setup/strings.txt.pl
+7
-0
No files found.
Bugzilla/Install/CPAN.pm
View file @
cabe5381
...
...
@@ -33,6 +33,7 @@ use Bugzilla::Constants;
use
Bugzilla::Install::
Requirements
qw(have_vers)
;
use
Bugzilla::Install::
Util
qw(bin_loc install_string)
;
use
Config
;
use
CPAN
;
use
Cwd
qw(abs_path)
;
use
File::
Path
qw(rmtree)
;
...
...
@@ -102,6 +103,8 @@ use constant CPAN_DEFAULTS => {
sub
check_cpan_requirements
{
my
(
$original_dir
,
$original_args
)
=
@_
;
_require_compiler
();
my
@install
;
foreach
my
$module
(
REQUIREMENTS
)
{
my
$installed
=
have_vers
(
$module
,
1
);
...
...
@@ -122,6 +125,26 @@ sub check_cpan_requirements {
}
}
sub
_require_compiler
{
my
@errors
;
my
$cc_name
=
$Config
{
cc
};
my
$cc_exists
=
bin_loc
(
$cc_name
);
if
(
!
$cc_exists
)
{
push
(
@errors
,
install_string
(
'install_no_compiler'
));
}
my
$make_name
=
$
CPAN::
Config
->
{
make
};
my
$make_exists
=
bin_loc
(
$make_name
);
if
(
!
$make_exists
)
{
push
(
@errors
,
install_string
(
'install_no_make'
));
}
die
@errors
if
@errors
;
}
sub
install_module
{
my
(
$name
,
$test
)
=
@_
;
my
$bzlib
=
BZ_LIB
;
...
...
Bugzilla/Install/Util.pm
View file @
cabe5381
...
...
@@ -58,8 +58,14 @@ our @EXPORT_OK = qw(
sub
bin_loc
{
my
(
$bin
,
$path
)
=
@_
;
# If the binary is a full path...
if
(
$bin
=~
m{[/\\]}
)
{
return
MM
->
maybe_command
(
$bin
)
||
''
;
}
# Otherwise we look for it in the path in a cross-platform way.
my
@path
=
$path
?
@$path
:
File::
Spec
->
path
;
foreach
my
$dir
(
@path
)
{
next
if
!-
d
$dir
;
my
$full_path
=
File::
Spec
->
catfile
(
$dir
,
$bin
);
...
...
template/en/default/setup/strings.txt.pl
View file @
cabe5381
...
...
@@ -131,6 +131,13 @@ then the value of the ##column## column that needs to be fixed:
EOT
install_module
=>
'Installing ##module## version ##version##...'
,
installation_failed
=>
'*** Installation aborted. Read the messages above. ***'
,
install_no_compiler
=>
<<
END
,
ERROR:
Using
install
-
module
.
pl
requires
that
you
install
a
compiler
,
such
as
gcc
.
END
install_no_make
=>
<<
END
,
ERROR:
Using
install
-
module
.
pl
requires
that
you
install
"make"
.
END
lc_new_vars
=>
<<
'END'
,
This
version
of
Bugzilla
contains
some
variables
that
you
may
want
to
change
and
adapt
to
your
local
settings
.
Please
edit
the
file
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment