diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2001-08-08 17:10:05 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2001-08-08 17:10:05 +0000 |
commit | ad33ed3c54d386eb5360195f88a9bf33359979d4 (patch) | |
tree | c865801badf79d3ab1249ed729eae8045db27320 /perl-install/printer.pm | |
parent | 1c1f82737073571060111e0130622c1bf05d7db3 (diff) | |
download | drakx-backup-do-not-use-ad33ed3c54d386eb5360195f88a9bf33359979d4.tar drakx-backup-do-not-use-ad33ed3c54d386eb5360195f88a9bf33359979d4.tar.gz drakx-backup-do-not-use-ad33ed3c54d386eb5360195f88a9bf33359979d4.tar.bz2 drakx-backup-do-not-use-ad33ed3c54d386eb5360195f88a9bf33359979d4.tar.xz drakx-backup-do-not-use-ad33ed3c54d386eb5360195f88a9bf33359979d4.zip |
Bugfixes on automatic installation of needed packages
Diffstat (limited to 'perl-install/printer.pm')
-rw-r--r-- | perl-install/printer.pm | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm index dda9dccea..1e4b11d0c 100644 --- a/perl-install/printer.pm +++ b/perl-install/printer.pm @@ -107,7 +107,7 @@ sub remove_package ($) { sub installed ($) { my ($package) = @_; - open RPMCHECK, "rpm -qa | grep $package |" || + open RPMCHECK, "rpm -qa --root $prefix/ | grep $package |" || die "Could not run rpm!"; my $found = 0; while (<RPMCHECK>) { @@ -151,6 +151,8 @@ sub resetinfo($) { # -check which printing system was used previously and load the information # -about its queues read_configured_queues($printer); + #my $entry = $printer->{configured}{$printer->{QUEUE}} || (values %{$printer->{configured}})[0]; + #print "##### $entry->{make} $entry->{model} $entry->{queuedata}{queue}\n"; } sub read_configured_queues($) { @@ -189,6 +191,18 @@ sub read_configured_queues($) { for ($i = 0; $i < $N; $i++) { $printer->{configured}{$QUEUES[$i]->{'queuedata'}{'queue'}} = $QUEUES[$i]; + if ((!$QUEUES[$i]->{'make'}) || (!$QUEUES[$i]->{'model'})) { + if ($printer->{SPOOLER} eq "cups") { + $printer->{OLD_QUEUE} = $QUEUES[$i]->{'queuedata'}{'queue'}; + my $descr = get_descr_from_ppd($printer); + $descr =~ m/^([^\|]*)\|([^\|]*)\|.*$/; + $printer->{configured}{$QUEUES[$i]->{'queuedata'}{'queue'}}{make} ||= $1; + $printer->{configured}{$QUEUES[$i]->{'queuedata'}{'queue'}}{model} ||= $2; + $printer->{OLD_QUEUE} = ""; + } + $printer->{configured}{$QUEUES[$i]->{'queuedata'}{'queue'}}{make} ||= ""; + $printer->{configured}{$QUEUES[$i]->{'queuedata'}{'queue'}}{model} ||= __("Unknown model"); + } } } |