From 9c3bd1165c40fa3834d4f18306385fc4552b8404 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 15 Jan 2002 15:35:11 +0000 Subject: have ddcxinfos take the best result of every run --- perl-install/any.pm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'perl-install/any.pm') diff --git a/perl-install/any.pm b/perl-install/any.pm index 708cf2507..98755a944 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -912,13 +912,18 @@ Or on the command line use: "usermod -G fileshare user_name"'); } sub ddcxinfos { + my @l = `$ENV{LD_LOADER} ddcxinfos`; if ($::isInstall && -e "/tmp/ddcxinfos") { - cat_("/tmp/ddcxinfos"); - } else { - my @l = `$ENV{LD_LOADER} ddcxinfos`; - output("/tmp/ddcxinfos", @l) if $::isInstall; - @l; + my @l_old = cat_("/tmp/ddcxinfos"); + if (@l < @l_old) { + log::l("new ddcxinfos is worse, keeping the previous one"); + @l = @l_old; + } elsif (@l > @l_old) { + log::l("new ddcxinfos is better, dropping the previous one"); + } } + output("/tmp/ddcxinfos", @l) if $::isInstall; + @l; } 1; -- cgit v1.2.1