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
c5a676ad
Commit
c5a676ad
authored
May 16, 2016
by
David Lawrence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1261114 - Release notes cannot be displayed due to missing REQUIRED_MODULES…
Bug 1261114 - Release notes cannot be displayed due to missing REQUIRED_MODULES and OPTIONAL_MODULES r=dylan
parent
2db8904f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
28 deletions
+48
-28
Template.pm
Bugzilla/Template.pm
+23
-9
release-notes.html.tmpl
template/en/default/pages/release-notes.html.tmpl
+25
-19
No files found.
Bugzilla/Template.pm
View file @
c5a676ad
...
@@ -1153,18 +1153,32 @@ sub create {
...
@@ -1153,18 +1153,32 @@ sub create {
# These don't work as normal constants.
# These don't work as normal constants.
DB_MODULE
=>
\&
Bugzilla::Constants::
DB_MODULE
,
DB_MODULE
=>
\&
Bugzilla::Constants::
DB_MODULE
,
REQUIRED_MODULES
=>
REQUIRED_MODULES
=>
sub
{
\&
Bugzilla::Install::Requirements::
REQUIRED_MODULES
,
my
%
required_modules
;
my
$cache
=
Bugzilla
->
request_cache
;
my
$meta
=
$cache
->
{
cpan_meta
}
||=
Bugzilla::Install::Requirements::
load_cpan_meta
();
my
$reqs
=
$meta
->
effective_prereqs
->
merged_requirements
([
'configure'
,
'runtime'
],
[
'requires'
]);
foreach
my
$module
(
sort
$reqs
->
required_modules
)
{
next
if
$module
eq
'perl'
;
$required_modules
{
$module
}
=
{
version
=>
$reqs
->
requirements_for_module
(
$module
)
};
}
return
\%
required_modules
;
},
OPTIONAL_MODULES
=>
sub
{
OPTIONAL_MODULES
=>
sub
{
my
@optional
=
@
{
OPTIONAL_MODULES
()};
my
%
optional_modules
;
foreach
my
$item
(
@optional
)
{
my
$cache
=
Bugzilla
->
request_cache
;
my
@features
;
my
$meta
=
$cache
->
{
cpan_meta
}
||=
Bugzilla::Install::Requirements::
load_cpan_meta
();
foreach
my
$feat_id
(
@
{
$item
->
{
feature
}
})
{
foreach
my
$feature
(
$meta
->
features
)
{
push
(
@features
,
install_string
(
"feature_$feat_id"
));
my
$reqs
=
$feature
->
prereqs
->
merged_requirements
([
'configure'
,
'runtime'
],
[
'requires'
]);
foreach
my
$module
(
$reqs
->
required_modules
)
{
my
$version
=
$reqs
->
requirements_for_module
(
$module
);
$optional_modules
{
$module
}
||=
{};
$optional_modules
{
$module
}{
version
}
=
$version
;
$optional_modules
{
$module
}{
features
}
||=
[]
;
push
(
@
{
$optional_modules
{
$module
}{
features
}},
$feature
->
description
);
}
}
$item
->
{
feature
}
=
\
@features
;
}
}
return
\
@optional
;
return
\
%
optional_modules
;
},
},
'default_authorizer'
=>
sub
{
return
Bugzilla::
Auth
->
new
()
},
'default_authorizer'
=>
sub
{
return
Bugzilla::
Auth
->
new
()
},
...
...
template/en/default/pages/release-notes.html.tmpl
View file @
c5a676ad
...
@@ -161,22 +161,26 @@
...
@@ -161,22 +161,26 @@
<h3 id="req_perl">Perl</h3>
<h3 id="req_perl">Perl</h3>
<p>Perl <span class="req_new">v5.1
0
.1</span></p>
<p>Perl <span class="req_new">v5.1
4
.1</span></p>
[% INCLUDE db_req db='mysql' %]
[% INCLUDE db_req db = 'mysql'
module = 'DBD::mysql' %]
[% INCLUDE db_req db='pg' %]
[% INCLUDE db_req db = 'pg'
module = 'DBD::Pg' %]
[% INCLUDE db_req db='oracle' %]
[% INCLUDE db_req db ='oracle'
module = 'DBD::Oracle' %]
[% INCLUDE db_req db='sqlite' %]
[% INCLUDE db_req db = 'sqlite'
module = 'DBD::SQLite' %]
<h3 id="req_modules">Required Perl Modules</h3>
<h3 id="req_modules">Required Perl Modules</h3>
[% INCLUDE req_table reqs = REQUIRED_MODULES
[% INCLUDE req_table reqs = REQUIRED_MODULES
new = ['File
-Slurp','JSON-XS', 'Email-
Sender']
new = ['File
::Slurp','JSON::XS', 'Email::
Sender']
updated = ['DateTime', 'DateTime
-
TimeZone',
updated = ['DateTime', 'DateTime
::
TimeZone',
'Template
-Toolkit
', 'URI'] %]
'Template', 'URI'] %]
<h3 id="req_optional_mod">Optional Perl Modules</h3>
<h3 id="req_optional_mod">Optional Perl Modules</h3>
...
@@ -184,8 +188,8 @@
...
@@ -184,8 +188,8 @@
features of Bugzilla:</p>
features of Bugzilla:</p>
[% INCLUDE req_table reqs = OPTIONAL_MODULES
[% INCLUDE req_table reqs = OPTIONAL_MODULES
new = ['Cache
-Memcached','File-Copy-
Recursive']
new = ['Cache
::Memcached::Fast','File::Copy::
Recursive']
updated = ['Chart
', 'Test-
Taint']
updated = ['Chart
::Lines', 'Test::
Taint']
include_feature = 1 %]
include_feature = 1 %]
<h3 id="req_apache">Optional Apache Modules</h3>
<h3 id="req_apache">Optional Apache Modules</h3>
...
@@ -454,7 +458,7 @@
...
@@ -454,7 +458,7 @@
</li>
</li>
<li><strong>perl module:</strong>
<li><strong>perl module:</strong>
[%+ m.dbd.module FILTER html %]
[%+ m.dbd.module FILTER html %]
[%+ '<span class="req_new">' IF dbd_new %]v[%
m.dbd
.version FILTER html %]
[%+ '<span class="req_new">' IF dbd_new %]v[%
OPTIONAL_MODULES.$module
.version FILTER html %]
[% '</span>' IF dbd_new %]</li>
[% '</span>' IF dbd_new %]</li>
</ul>
</ul>
[% END %]
[% END %]
...
@@ -468,20 +472,22 @@
...
@@ -468,20 +472,22 @@
<th>Enables Feature</th>
<th>Enables Feature</th>
[% END %]
[% END %]
</tr>
</tr>
[% FOREACH req = reqs %]
[% FOREACH module = reqs.keys.sort %]
[% NEXT IF module.match('^DBD') %]
[% version = reqs.$module.version %]
<tr>
<tr>
<td [% ' class="req_new"' IF new.contains(
req.packag
e) %]>
<td [% ' class="req_new"' IF new.contains(
modul
e) %]>
[%-
req.
module FILTER html %]</td>
[%- module FILTER html %]</td>
<td [% ' class="req_new"' IF updated.contains(
req.packag
e)
<td [% ' class="req_new"' IF updated.contains(
modul
e)
OR new.contains(
req.packag
e) %]>
OR new.contains(
modul
e) %]>
[%- IF
req.
version == 0 %]
[%- IF version == 0 %]
(Any)
(Any)
[% ELSE %]
[% ELSE %]
[%-
req.
version FILTER html %]
[%- version FILTER html %]
[% END %]
[% END %]
</td>
</td>
[% IF include_feature %]
[% IF include_feature %]
<td>[% req
.feature
.join(', ') FILTER html %]</td>
<td>[% req
s.$module.features
.join(', ') FILTER html %]</td>
[% END %]
[% END %]
</tr>
</tr>
[% END %]
[% END %]
...
...
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