summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/main.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-10 13:38:50 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-10 13:38:50 +0000
commit2707019e8d43f78fd3913c0ca5f2d79d2fa20cc1 (patch)
tree01de6b030ad01e8f7ad728ce01742317a6963207 /perl-install/Xconfig/main.pm
parenta864aa06bfc1fe86c37633158926f287110af834 (diff)
downloaddrakx-2707019e8d43f78fd3913c0ca5f2d79d2fa20cc1.tar
drakx-2707019e8d43f78fd3913c0ca5f2d79d2fa20cc1.tar.gz
drakx-2707019e8d43f78fd3913c0ca5f2d79d2fa20cc1.tar.bz2
drakx-2707019e8d43f78fd3913c0ca5f2d79d2fa20cc1.tar.xz
drakx-2707019e8d43f78fd3913c0ca5f2d79d2fa20cc1.zip
simplify and factorize
(now works on 1.upgrade 2.install 3.install + change existing config)
Diffstat (limited to 'perl-install/Xconfig/main.pm')
-rw-r--r--perl-install/Xconfig/main.pm19
1 files changed, 19 insertions, 0 deletions
diff --git a/perl-install/Xconfig/main.pm b/perl-install/Xconfig/main.pm
index 0e9f335c5..546ae6e64 100644
--- a/perl-install/Xconfig/main.pm
+++ b/perl-install/Xconfig/main.pm
@@ -140,6 +140,25 @@ sub configure_chooser {
'config_changed';
}
+sub configure_everything_or_configure_chooser {
+ my ($in, $options, $auto, $keyboard, $mouse) = @_;
+ my $raw_X = Xconfig::xfree->read;
+ my $default = Xconfig::default::configure($keyboard, $mouse);
+ my $has_conf = @{$raw_X->{xfree3}} || @{$raw_X->{xfree4}};
+ $raw_X->{xfree3} = $default->{xfree3} if !@{$raw_X->{xfree3}};
+ $raw_X->{xfree4} = $default->{xfree4} if !@{$raw_X->{xfree4}};
+
+ return $raw_X if $has_conf && $auto;
+
+ if ($has_conf) {
+ Xconfig::main::configure_chooser($in, $raw_X, $in->do_pkgs, $options) or return;
+ } else {
+ Xconfig::main::configure_everything($in, $raw_X, $in->do_pkgs, $auto, $options) or return;
+ }
+ $raw_X;
+}
+
+
sub may_write {
my ($in, $raw_X, $X, $ok) = @_;