This has been tested with kde-base/kdebase-3.1.4, and probably occurs in all other versions. When printing plain text files with kprinter, it asks if you want to convert the text to postscript (which is sometimes required), or print it as is. To convert, kprinter relies on enscript, which is not a dependency and thus probably not installed. This will give the user an error. This could confuse the user, and he/she might not know what to do. Reproducible: Always Steps to Reproduce: 1. # kprinter <any_text_file> 2. click print 3. when asked to convert, press convert Actual Results: Two Dialog Boxes: #1 - Printer Error "Error while printing files" #2 - Catastrophe! - KNotify "A print error occured. Error message received from system: Error while filtering. Command was: enscript -M %psu -p %out %in." Expected Results: Exit without an error and print the according file. Using kde-base/kdebase-3.1.4, cups-1.1.19-r1, and print settings do not matter, nor the selection of the printer.
This also happens with the postscript filters that kdebase supports by default even though it is smart enough to make theses features unavailable through the frontend there is no indication of what needs to be done to get the filters working. I propose a cross-package USE variable such as psfilter that would allow each package that knows how to use the different postscript filter packages to depend on the filter packages that they know how to use based on the presence of this USE variable. I make this proposal because there are many packages that make use of the packages like psutils and enscript. This would allow for cups and kdebase and any other packages that might use these utilities to know to pull them in.
Created attachment 22220 [details] /usr/portage/kde-base/kdebase/kdebase-3.1.4-r1.ebuild Proposed change to accept virtual/jre as lowest common denominator java run-time as most jdk that provide virtual/jdk also provide virtual/jre when installed and it doesn't appear that kdebase actually only needs the java run-time.
still the same problem with kde 3.2.3 kde should depend on app-text/enscript. or this convert feature should be disabled at compile time, if possible.
I'm not sure what to make of this for 3.3.0 - I find no reference to "enscript" in any of the files in the kdeprint directory, and I see no configuration option searching for it.
This is still valid for KDE 3.3, Caleb. This is the message (in german) you get, if enscript is not installed: Fehler bei der Filter-Ein/Ausgabe. Der Befehl lautete enscript -M %psu -p %out %in.
So is it simple enough that we can just add enscript as a dep based on the cups use flag?
I don't think it has anything to do with cups. It is just a dependency of the kde printing system which afaik is also built with "-cups". These two files mention enscript: /usr/kde/3.3/share/apps/kdeprint/filters/enscript.xml /usr/kde/3.3/share/apps/kdeprint/filters/enscript.desktop Both are part of kde-base/kdelibs-3.3.0. On the other hand adding enscript as dependency would also mean to add psutils because there is a filter for psnup, etc. So it would probably be necessary to add USE flags for enscript, psutils, etc. Or just leave it as it is and send a note to the kde devs to make a better error message which proposes to install enscript. I would prefer the second solution because it seems to me neither necessary nor very clever to rebuild kdelibs with "enscript" USE flag just to pull in the optional dependency. enscript and all the other dependencies for filters can easily be installed seperately if the filter is used.
Created attachment 40665 [details, diff] kdeprint-check-filters.patch Moreover, kde knows if a filter is available or not, it is just missing a check when doing the conversion. The patch fixes that, and gives a different error message for the case of "no filters found". What do you think? I'm going to post it at kde bugzilla if nobody does first.
I forgot about this bug, but eventually I submitted the patch and now it's in KDE CVS. Closing.
Thanks!