From 47ee48a70f9abe53bc5e934f6e83c997b350dc6b Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Thu, 14 Sep 2006 10:12:22 +0000 Subject: Bug 277502: Re-organize checksetup.pl to be understood more easily (make it a short series of subroutines) Patch By Max Kanat-Alexander (module owner) a=justdave --- Bugzilla/Install/Requirements.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Bugzilla/Install/Requirements.pm') diff --git a/Bugzilla/Install/Requirements.pm b/Bugzilla/Install/Requirements.pm index ea3d81eb9..fbe153b25 100644 --- a/Bugzilla/Install/Requirements.pm +++ b/Bugzilla/Install/Requirements.pm @@ -25,6 +25,8 @@ package Bugzilla::Install::Requirements; use strict; +use POSIX (); + use base qw(Exporter); our @EXPORT = qw( REQUIRED_MODULES @@ -33,6 +35,7 @@ our @EXPORT = qw( check_requirements check_graphviz + display_version_and_os have_vers vers_cmp install_command @@ -392,6 +395,20 @@ sub check_graphviz { return $return; } +sub display_version_and_os { + # Display version information + printf "\n* This is Bugzilla " . BUGZILLA_VERSION . " on perl %vd\n", + $^V; + my @os_details = POSIX::uname; + # 0 is the name of the OS, 2 is the major version, + my $os_name = $os_details[0] . ' ' . $os_details[2]; + if (ON_WINDOWS) { + require Win32; + $os_name = Win32::GetOSName(); + } + # 3 is the minor version. + print "* Running on $os_name $os_details[3]\n" +} # This was originally clipped from the libnet Makefile.PL, adapted here to # use the below vers_cmp routine for accurate version checking. -- cgit v1.2.3-24-g4f1b