summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2003-02-01 22:02:13 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2003-02-01 22:02:13 +0000
commitab577dee1ee0160047f246c8d3c32dd40d12aa95 (patch)
tree817655746396308863c2536a1bcdb11085d259a5
parentc0a23db4a25851d7b09d822ed22d612210309619 (diff)
downloaddrakx-backup-do-not-use-ab577dee1ee0160047f246c8d3c32dd40d12aa95.tar
drakx-backup-do-not-use-ab577dee1ee0160047f246c8d3c32dd40d12aa95.tar.gz
drakx-backup-do-not-use-ab577dee1ee0160047f246c8d3c32dd40d12aa95.tar.bz2
drakx-backup-do-not-use-ab577dee1ee0160047f246c8d3c32dd40d12aa95.tar.xz
drakx-backup-do-not-use-ab577dee1ee0160047f246c8d3c32dd40d12aa95.zip
- Improved generation of printer list entries from manufacturer-supplied PostScript PPDs.
-rw-r--r--perl-install/printer/main.pm21
1 files changed, 15 insertions, 6 deletions
diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm
index c919287bd..2ee75ba04 100644
--- a/perl-install/printer/main.pm
+++ b/perl-install/printer/main.pm
@@ -1361,7 +1361,7 @@ sub clean_manufacturer_name {
$make =~ s/^SEIKO[\s\-]*EPSON/EPSON/i;
$make =~ s/^KYOCERA[\s\-]*MITA/KYOCERA/i;
$make =~ s/^CITOH/C.ITOH/i;
- $make =~ s/^OKI(|[\s\-]*DATA)/OKIDATA/i;
+ $make =~ s/^OKI(|[\s\-]*DATA)\s*$/OKIDATA/i;
$make =~ s/^(SILENTWRITER2?|COLORMATE)/NEC/i;
$make =~ s/^(XPRINT|MAJESTIX)/XEROX/i;
$make =~ s/^QMS-PS/QMS/i;
@@ -1400,11 +1400,15 @@ sub ppd_entry_str {
/^\s*(Generic\s*PostScript\s*Printer)\s*,?\s*(.*)$/i) ||
($descr =~
/^\s*(PostScript\s*Printer)\s*,?\s*(.*)$/i) ||
- ($descr =~ /^([^,]+[^,\s])\s*(\(v?\d\d\d\d\.\d\d\d\).*)$/i) ||
- ($descr =~ /^([^,]+[^,\s])\s+(PS.*)$/i) ||
- ($descr =~ /^([^,]+[^,\s])\s*(PostScript.*)$/i) ||
- ($descr =~ /^([^,]+[^,\s])\s*(v\d+\.\d+.*)$/i) ||
- ($descr =~ /^([^,]+),\s*(.+)$/)) {
+ ($descr =~ /^([^,]+[^,\s])\s*,?\s*(Foomatic.*)$/i) ||
+ ($descr =~ /^([^,]+[^,\s])\s*,?\s*(GhostScript.*)$/i) ||
+ ($descr =~ /^([^,]+[^,\s])\s*,?\s*(CUPS.*)$/i) ||
+ ($descr =~
+ /^([^,]+[^,\s])\s*,?\s*(\(v?\d\d\d\d\.\d\d\d\).*)$/i) ||
+ ($descr =~ /^([^,]+[^,\s])\s*,?\s*(v\d+\.\d+.*)$/i) ||
+ ($descr =~ /^([^,]+[^,\s])\s*,?\s*(PostScript.*)$/i) ||
+ ($descr =~ /^([^,]+[^,\s])\s*,?\s+(PS.*)$/i) ||
+ ($descr =~ /^([^,]+)\s*,?\s*(.+)$/)) {
$model = $1;
$driver = $2;
$model =~ s/[\-\s,]+$//;
@@ -1443,6 +1447,11 @@ sub ppd_entry_str {
if ($mf eq "EPSON") {
$model =~ s/Stylus CX\-/Stylus CX/;
}
+ # Remove the "Oki" from the beginning of the model names of Okidata
+ # printers
+ if ($mf eq "OKIDATA") {
+ $model =~ s/Oki\s+//i;
+ }
# Try again to remove manufacturer's name from the beginning of the
# model name, this with the cleaned manufacturer name
$model =~ s/^$mf[\s\-]+//i