Bugzilla – Attachment 142131 Details for
Bug 31865
Hide display of 'dev/testing' packages on production installs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31865: hide development modules
Bug31865-hide-development-modules.patch (text/plain), 2.04 KB, created by
Mason James
on 2022-10-19 04:52:15 UTC
(
hide
)
Description:
Bug 31865: hide development modules
Filename:
MIME Type:
Creator:
Mason James
Created:
2022-10-19 04:52:15 UTC
Size:
2.04 KB
patch
obsolete
>From cdb0210e8c8892ab9ab88e92735bcaefdc9bd024 Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Mon, 10 Oct 2022 07:10:25 +1300 >Subject: [PATCH] =?UTF-8?q?Bug=C2=A031865:=20hide=20development=20modules?= >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit >Content-Type: text/plain; charset="utf-8" > >--- > C4/Installer/PerlModules.pm | 3 +++ > about.pl | 7 ++++++- > 2 files changed, 9 insertions(+), 1 deletion(-) > >diff --git a/C4/Installer/PerlModules.pm b/C4/Installer/PerlModules.pm >index 5d4a84ecda..fdf4ac0e49 100644 >--- a/C4/Installer/PerlModules.pm >+++ b/C4/Installer/PerlModules.pm >@@ -21,11 +21,13 @@ sub new { > > sub prereqs { > my $self = shift; >+ my @phases; > > unless (defined $self->{prereqs}) { > my $filename = $INC{'C4/Installer/PerlModules.pm'}; > my $path = dirname(dirname(dirname($filename))); > $self->{prereqs} = Module::CPANfile->load("$path/cpanfile")->prereqs; >+ @phases = $self->{prereqs}->phases; > } > > return $self->{prereqs}; >@@ -58,6 +60,7 @@ sub versions_info { > my $module_infos = { > cur_ver => 0, > required => $type eq 'requires', >+ phase => $phase > }; > > my $vers = $reqs->structured_requirements_for_module($module); >diff --git a/about.pl b/about.pl >index e92015fbc7..d34f39c56c 100755 >--- a/about.pl >+++ b/about.pl >@@ -661,6 +661,12 @@ foreach my $pm_type(@pm_types) { > my $modules = $perl_modules->get_attr($pm_type); > foreach (@$modules) { > my ($module, $stats) = each %$_; >+ >+ # skip 'development' modules from displaying, unless its a dev install >+ unless ( $ENV{DEV_INSTALL} ) { >+ next if $stats->{'phase'} eq 'develop' ; >+ } >+ > push( > @components, > { >@@ -697,7 +703,6 @@ if (scalar(@$row) > 0) { > # Pushing the last line > push (@$table, {row => $row}); > } >-## ## $table > > $template->param( table => $table ); > >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31865
:
142127
|
142128
|
142130
| 142131 |
142132
|
146553
|
146554