Comment 25 for bug 206365

Revision history for this message
FriedChicken (domlyons) wrote :

It really wasn't easy to find the solution for the problem and it took me some time ...
(as I've already said I have no experience in bash-scripting)

The problem is a bit complex and consists of three parts:
1. wrong set permissions (already solved, see above)
2. incorrect generated cupswarpper-script (probably a problem with sed&awk if you used that)
3. problems that probably already exist in the original driver (I will test that later on, but I can't imagine something else)

Probably it's the best if I explain it using diff-excerpts:

Category 2:

> 513c531
> < echo $5 |tr " " n > $INPUT_TEMP_OPTIONS
> ---
> > echo $5 |tr " " '\n' > $INPUT_TEMP_OPTIONS
$5 wasn't seperated correctly (with a line feed) anymore

> 462c480
> < set Default=`echo "$Default" |sed s/" "//g |sed s/" "//g `
> ---
> > set Default=`echo "$Default" |sed s/" "//g |sed s/" "//g `
Second sed has a TAB between both " instead of a space

Category 3:

> 62a65,80
> > Resolution=Fast0 "-reso 300 -md PLAIN -doc GRAPH" \
> ...
> Resolution=Highest2 "-reso 1200x6000 -md GLOSSY -doc PHOTO" \
> ...
> > Resolution=Fine4 "-reso 1200 -md SLOWDRY" \
- Added missing functionality (copied from PPD-section)
- Corrected resolution for Highest2 (1200x600just can't be true: it would be less than some other and it wouldn't use the printers whole ability), done of course also in the PPD-section

> 75,113c93,131
> < Bi-DirPrinting=OFF "-bidir OFF" \
> ...
> < PaperThickness=Thick "-thick THICK" \
> ---
> > BiDir=OFF "-bidir OFF" \
> ...
> > PaperThick=Thick "-thick THICK" \
> 117,118c135,136
> < ColorOrMono=Mono "-corm MONO" \
> < ColorOrMono=Color "-corm COLOR" \
> ---
> > MonoColor=Mono "-corm MONO" \
> > MonoColor=Color "-corm COLOR" \
> 125,128c143,146
> < HalfTone=DIFFUSION "-ht DIFFUSION" \
> < HalfTone=DITHER "-ht DITHER" \
> < ColorEnhance=OFF "-ce OFF" \
> < ColorEnhance=ON "-ce ON" \
> ---
> > HalfTonePattern=DIFFUSION "-ht DIFFUSION" \
> > HalfTonePattern=DITHER "-ht DITHER" \
> > ColorEnhancement=OFF "-ce OFF" \
> > ColorEnhancement=ON "-ce ON" \
> 135,137c153,155
> < RedKey= "-red " \
> < GreenKey= "-green " \
> < BlueKey= "-blue " \
> ---
> > Red= "-red " \
> > Green= "-green " \
> > Blue= "-blue " \
Made script compatible with the PPD-file (PPD is Ver1.01, scrpt 0.80 as probably wasn't updated together with the PPD)

> 517c535
> < if("`grep $brcommands[$i] $INPUT_TEMP_OPTIONS`" != "") then
> ---
> > if("`grep -i $brcommands[$i] $INPUT_TEMP_OPTIONS`" != "") then
case-sensitive grep leads to errors

> 532c550
> < set option_tmp=`echo $INPUT_TEMP_LINE | sed s/"$brcommands2[$i]"/"$brcommands2[$ii]"/`
> ---
> > set option_tmp=`echo $INPUT_TEMP_LINE | sed s/"BR""$brcommands2[$i]"/"$brcommands2[$ii]"/`
"BR" had to be added because of the Brother-Prefix in all arguments

As far as I tested it there are no errors anymore.
Probably it's possible to use the same patch for most of the other drivers, for i.e. MFC210C only the printername has to be changed in the script.

Trying this out I found some new printer-related bugs ... bug #222686 and bug #222602