summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2003-01-14 23:19:10 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2003-01-14 23:19:10 +0000
commit032d70f4b3851500fee1aa303f346d2a22e4d6d4 (patch)
tree71acfe815d1d7ad9493b359226b4e272cc1a9255
parenta812d518a577c05d6e88ed8326a0d71b9d48664e (diff)
downloaddrakx-032d70f4b3851500fee1aa303f346d2a22e4d6d4.tar
drakx-032d70f4b3851500fee1aa303f346d2a22e4d6d4.tar.gz
drakx-032d70f4b3851500fee1aa303f346d2a22e4d6d4.tar.bz2
drakx-032d70f4b3851500fee1aa303f346d2a22e4d6d4.tar.xz
drakx-032d70f4b3851500fee1aa303f346d2a22e4d6d4.zip
Removed bugs from Titi which prevented printerdrake from installing the requested spooler.
-rw-r--r--perl-install/printer/data.pm98
-rw-r--r--perl-install/printer/printerdrake.pm12
2 files changed, 55 insertions, 55 deletions
diff --git a/perl-install/printer/data.pm b/perl-install/printer/data.pm
index a6ce568c0..ef252a3a9 100644
--- a/perl-install/printer/data.pm
+++ b/perl-install/printer/data.pm
@@ -42,54 +42,54 @@ our %spoolers = ('pdq' => {
[ 'lpc', '/usr/sbin/lpc-lpd' ]
]
},
- 'lprng' => {
- 'print_command' => 'lpr-lpd',
- 'long_name' => N("LPRng - LPR New Generation"),
- 'short_name' => N("LPRng"),
- 'boot_spooler' => 'lpd',
- 'service' => 'lpd',
- 'packages2add' => [ [qw(LPRng net-tools gpr a2ps ImageMagick)],
- [qw(/usr/lib/filters/lpf
- /usr/sbin/lpd
- /sbin/ifconfig
- /usr/bin/gpr
- /usr/bin/a2ps
- /usr/bin/convert)] ],
- 'packages2rm' => [ 'lpr', '/usr/sbin/lpf' ],
- 'alternatives' => [
- [ 'lpr', '/usr/bin/lpr-lpd' ],
- [ 'lpq', '/usr/bin/lpq-lpd' ],
- [ 'lprm', '/usr/bin/lprm-lpd' ],
- [ 'lp', '/usr/bin/lp-lpd' ],
- [ 'cancel', '/usr/bin/cancel-lpd' ],
- [ 'lpstat', '/usr/bin/lpstat-lpd' ],
- [ 'lpc', '/usr/sbin/lpc-lpd' ]
- ]
- },
- 'cups' => {
- 'print_command' => 'lpr-cups',
- 'long_name' => N("CUPS - Common Unix Printing System"),
- 'short_name' => N("CUPS"),
- 'boot_spooler' => 'cups',
- 'service' => 'cups',
- 'packages2add' => [ ['cups', 'net-tools', 'xpp', if_($::expert, 'cups-drivers'),
- $::isInstall ? 'curl' : 'webfetch'],
- [ qw(/usr/lib/cups/cgi-bin/printers.cgi
- /sbin/ifconfig
- /usr/bin/xpp),
- if_($::expert, "/usr/share/cups/model/postscript.ppd.gz"),
- $::isInstall ? '/usr/bin/curl' : '/usr/bin/wget' ] ],
- 'alternatives' => [
- [ 'lpr', '/usr/bin/lpr-cups' ],
- [ 'lpq', '/usr/bin/lpq-cups' ],
- [ 'lprm', '/usr/bin/lprm-cups' ],
- [ 'lp', '/usr/bin/lp-cups' ],
- [ 'cancel', '/usr/bin/cancel-cups' ],
- [ 'lpstat', '/usr/bin/lpstat-cups' ],
- [ 'lpc', '/usr/sbin/lpc-cups' ]
- ]
- }
- );
-our %spooler_inv = map { $spoolers{$_}{long_name} => $spoolers{$_} } keys %spoolers;
+ 'lprng' => {
+ 'print_command' => 'lpr-lpd',
+ 'long_name' => N("LPRng - LPR New Generation"),
+ 'short_name' => N("LPRng"),
+ 'boot_spooler' => 'lpd',
+ 'service' => 'lpd',
+ 'packages2add' => [ [qw(LPRng net-tools gpr a2ps ImageMagick)],
+ [qw(/usr/lib/filters/lpf
+ /usr/sbin/lpd
+ /sbin/ifconfig
+ /usr/bin/gpr
+ /usr/bin/a2ps
+ /usr/bin/convert)] ],
+ 'packages2rm' => [ 'lpr', '/usr/sbin/lpf' ],
+ 'alternatives' => [
+ [ 'lpr', '/usr/bin/lpr-lpd' ],
+ [ 'lpq', '/usr/bin/lpq-lpd' ],
+ [ 'lprm', '/usr/bin/lprm-lpd' ],
+ [ 'lp', '/usr/bin/lp-lpd' ],
+ [ 'cancel', '/usr/bin/cancel-lpd' ],
+ [ 'lpstat', '/usr/bin/lpstat-lpd' ],
+ [ 'lpc', '/usr/sbin/lpc-lpd' ]
+ ]
+ },
+ 'cups' => {
+ 'print_command' => 'lpr-cups',
+ 'long_name' => N("CUPS - Common Unix Printing System"),
+ 'short_name' => N("CUPS"),
+ 'boot_spooler' => 'cups',
+ 'service' => 'cups',
+ 'packages2add' => [ ['cups', 'net-tools', 'xpp', if_($::expert, 'cups-drivers'),
+ $::isInstall ? 'curl' : 'webfetch'],
+ [ qw(/usr/lib/cups/cgi-bin/printers.cgi
+ /sbin/ifconfig
+ /usr/bin/xpp),
+ if_($::expert, "/usr/share/cups/model/postscript.ppd.gz"),
+ $::isInstall ? '/usr/bin/curl' : '/usr/bin/wget' ] ],
+ 'alternatives' => [
+ [ 'lpr', '/usr/bin/lpr-cups' ],
+ [ 'lpq', '/usr/bin/lpq-cups' ],
+ [ 'lprm', '/usr/bin/lprm-cups' ],
+ [ 'lp', '/usr/bin/lp-cups' ],
+ [ 'cancel', '/usr/bin/cancel-cups' ],
+ [ 'lpstat', '/usr/bin/lpstat-cups' ],
+ [ 'lpc', '/usr/sbin/lpc-cups' ]
+ ]
+ }
+ );
+our %spooler_inv = map { $spoolers{$_}{long_name} => $_ } keys %spoolers;
our %shortspooler_inv = map { $spoolers{$_}{short_name} => $spoolers{$_} } keys %spoolers;
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm
index 7345d09da..81b570ff3 100644
--- a/perl-install/printer/printerdrake.pm
+++ b/perl-install/printer/printerdrake.pm
@@ -2769,9 +2769,9 @@ sub install_spooler {
# Avoid unnecessary restarting of CUPS, this blocks the
# startup of printerdrake for several seconds.
printer::services::start_not_running_service("cups");
- } elsif ($spoolers{$spooler}{service}) {
- printer::services::restart($spoolers{$spooler}{service});
- }
+ } elsif ($spoolers{$spooler}{service}) {
+ printer::services::restart($spoolers{$spooler}{service});
+ }
# Set the choosen spooler tools as defaults for "lpr", "lpq", "lprm", ...
foreach (@{$spoolers{$spooler}{alternatives}}) {
@@ -2800,9 +2800,9 @@ sub setup_default_spooler {
$in->ask_from_list_(N("Select Printer Spooler"),
N("Which printing system (spooler) do you want to use?"),
[ printer::main::spooler() ],
- $spoolers{$printer->{SPOOLER}},
+ $spoolers{$printer->{SPOOLER}}{long_name},
) or return;
- $printer->{SPOOLER} = $spoolers{$str_spooler};
+ $printer->{SPOOLER} = $spooler_inv{$str_spooler};
# Install the spooler if not done yet
if (!install_spooler($printer, $in, $upNetwork)) {
$printer->{SPOOLER} = $oldspooler;
@@ -2893,7 +2893,7 @@ sub main {
}
# only experts should be asked for the spooler
- $printer->{SPOOLER} ||= 'cups' if $::expert;
+ $printer->{SPOOLER} ||= 'cups' if !$::expert;
}