From 92a2f3908524627fa0c86c93cfc8f6db9b211eab Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 9 Sep 2002 11:02:04 +0000 Subject: - use variable $::no_ugtk_init in ugtk.pm instead of using $::isInstall - that way, the X test can be made to work both at install and standalone --- perl-install/Xconfig/test.pm | 2 +- perl-install/install2.pm | 1 + perl-install/ugtk.pm | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/Xconfig/test.pm b/perl-install/Xconfig/test.pm index dff5fd261..fec3bffe7 100644 --- a/perl-install/Xconfig/test.pm +++ b/perl-install/Xconfig/test.pm @@ -100,7 +100,7 @@ sub test { open F, "|perl 2>/dev/null"; print F "use lib qw(", join(' ', @INC), ");\n"; print F q{ - BEGIN { $::isInstall = 1 } + BEGIN { $::no_ugtk_init = 1 } require lang; require my_gtk; my_gtk->import(qw(:wrappers)); #- help perl_checker diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 11149214b..6fbc15ff5 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -347,6 +347,7 @@ sub main { umask 022; $::isInstall = 1; + $::no_ugtk_init = 1; $::expert = $::g_auto_install = 0; #- c::unlimit_core() unless $::testing; diff --git a/perl-install/ugtk.pm b/perl-install/ugtk.pm index 4b062a533..5c05a31a7 100644 --- a/perl-install/ugtk.pm +++ b/perl-install/ugtk.pm @@ -15,7 +15,7 @@ $EXPORT_TAGS{all} = [ map { @$_ } values %EXPORT_TAGS ]; use Gtk; -unless ($::isInstall) { +if (!$::no_ugtk_init) { !$ENV{DISPLAY} || system('/usr/X11R6/bin/xtest') and die "Cannot be run in console mode.\n"; Gtk->init; eval { require Gtk::Gdk::Pixbuf; Gtk::Gdk::Pixbuf->init }; -- cgit v1.2.1