Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 30133

Summary: kdebase can depend on enscript if user wants to print and convert text files
Product: Gentoo Linux Reporter: Albert <exitware>
Component: [OLD] KDEAssignee: Gentoo KDE team <kde>
Severity: minor CC: henning, kde
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: /usr/portage/kde-base/kdebase/kdebase-3.1.4-r1.ebuild

Description Albert 2003-10-01 22:06:02 UTC
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.
Comment 1 Danyel Lawson 2003-12-14 12:31:24 UTC
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.
Comment 2 Danyel Lawson 2003-12-14 13:56:41 UTC
Created attachment 22220 [details]

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
Comment 3 Henning Schild 2004-08-08 03:15:43 UTC
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.
Comment 4 Caleb Tennis (RETIRED) gentoo-dev 2004-09-03 06:32:44 UTC
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.
Comment 5 Carsten Lohrke (RETIRED) gentoo-dev 2004-09-03 07:15:59 UTC
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.
Comment 6 Caleb Tennis (RETIRED) gentoo-dev 2004-09-19 20:12:52 UTC
So is it simple enough that we can just add enscript as a dep based on the cups use flag?
Comment 7 Stephan Schiffel 2004-09-28 04:11:43 UTC
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:
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.
Comment 8 Gregorio Guidi (RETIRED) gentoo-dev 2004-09-28 15:32:42 UTC
Created attachment 40665 [details, diff]

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.
Comment 9 Gregorio Guidi (RETIRED) gentoo-dev 2005-01-20 05:22:40 UTC
I forgot about this bug, but eventually I submitted the patch and now it's in
KDE CVS. Closing.
Comment 10 Albert 2005-01-20 19:14:56 UTC