summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/test.pm
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2005-10-20 14:05:54 +0000
committerMystery Man <unknown@mandriva.org>2005-10-20 14:05:54 +0000
commit9b6a0d83d135fad376b4eadcb2bd7bd8c8a07aa5 (patch)
treef3ef7ada2ce82dafb6d41cc087b0cc7fdfc40a46 /perl-install/Xconfig/test.pm
parent3e4ad5e1b687f262a1d7cc39a0b905a595ac7f95 (diff)
downloaddrakx-backup-do-not-use-9b6a0d83d135fad376b4eadcb2bd7bd8c8a07aa5.tar
drakx-backup-do-not-use-9b6a0d83d135fad376b4eadcb2bd7bd8c8a07aa5.tar.gz
drakx-backup-do-not-use-9b6a0d83d135fad376b4eadcb2bd7bd8c8a07aa5.tar.bz2
drakx-backup-do-not-use-9b6a0d83d135fad376b4eadcb2bd7bd8c8a07aa5.tar.xz
drakx-backup-do-not-use-9b6a0d83d135fad376b4eadcb2bd7bd8c8a07aa5.zip
This commit was manufactured by cvs2svn to create tagV10_34_11_100mdk
'V10_34_11_100mdk'.
Diffstat (limited to 'perl-install/Xconfig/test.pm')
-rw-r--r--perl-install/Xconfig/test.pm32
1 files changed, 24 insertions, 8 deletions
diff --git a/perl-install/Xconfig/test.pm b/perl-install/Xconfig/test.pm
index e2ac0505a..8a2ecc632 100644
--- a/perl-install/Xconfig/test.pm
+++ b/perl-install/Xconfig/test.pm
@@ -48,7 +48,7 @@ sub test {
fuzzy_pidofs(qr/\bxfs\b/) or die "xfs is not running";
my $f = $::testing ? $tmpconfig : "/etc/X11/XF86Config.test";
- $raw_X->write("$::prefix/$f");
+ $raw_X->{Xconfig::card::using_xf4($card) ? 'xfree4' : 'xfree3'}->write("$::prefix/$f");
my $f_err = common::secured_file($::prefix . ($ENV{TMPDIR} || "$ENV{HOME}/tmp") . '/.drakx.Xoutput');
@@ -57,7 +57,9 @@ sub test {
system("xauth add :9 . `mcookie`");
open STDERR, ">$f_err";
chroot $::prefix if $::prefix;
- exec 'XFree86', '-xf86config', $f, ":9" or c::_exit(0);
+ exec $card->{prog},
+ if_($card->{prog} !~ /Xsun/, "-xf86config", $f),
+ ":9" or c::_exit(0);
}
do { sleep 1 } until xtest(":9") || waitpid($pid, c::WNOHANG());
@@ -74,12 +76,26 @@ sub test {
local $_;
i: while (<$F>) {
- if (/^\(EE\)/ && !/Disabling/ || /^Fatal\b/) {
- my @msg = !/error/ && $_;
- local $_;
- while (<$F>) {
- /reporting a problem/ and last;
- $warn_error->(join(@msg, $_));
+ if (Xconfig::card::using_xf4($card)) {
+ if (/^\(EE\)/ && !/Disabling/ || /^Fatal\b/) {
+ my @msg = !/error/ && $_;
+ local $_;
+ while (<$F>) {
+ /reporting a problem/ and last;
+ $warn_error->(join(@msg, $_));
+ return 0;
+ }
+ }
+ } else {
+ if (/\b(error|not supported)\b/i) {
+ my @msg = !/error/ && $_;
+ local $_;
+ while (<$F>) {
+ /not fatal/ and last i;
+ /^$/ and last;
+ push @msg, $_;
+ }
+ $warn_error->(join(@msg));
return 0;
}
}