summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-01-15 15:35:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-01-15 15:35:11 +0000
commit9c3bd1165c40fa3834d4f18306385fc4552b8404 (patch)
tree693aa337011d175e4b27c6450f329b4ce1383dee /perl-install
parent75409b91dac1273bc73c50d83c72fb01f3bf5a35 (diff)
downloaddrakx-backup-do-not-use-9c3bd1165c40fa3834d4f18306385fc4552b8404.tar
drakx-backup-do-not-use-9c3bd1165c40fa3834d4f18306385fc4552b8404.tar.gz
drakx-backup-do-not-use-9c3bd1165c40fa3834d4f18306385fc4552b8404.tar.bz2
drakx-backup-do-not-use-9c3bd1165c40fa3834d4f18306385fc4552b8404.tar.xz
drakx-backup-do-not-use-9c3bd1165c40fa3834d4f18306385fc4552b8404.zip
have ddcxinfos take the best result of every run
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm15
1 files changed, 10 insertions, 5 deletions
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;