Bug 512739 - foomatic ppd's should avoid perl
Summary: foomatic ppd's should avoid perl
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: foomatic-db
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 461234
Blocks: F12Target
TreeView+ depends on / blocked
 
Reported: 2009-07-20 15:59 UTC by Adam Jackson
Modified: 2009-08-18 08:51 UTC (History)
3 users (show)

Fixed In Version: 4.0-3.20090702.fc12
Clone Of:
Environment:
Last Closed: 2009-08-18 08:51:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Adam Jackson 2009-07-20 15:59:45 UTC
Description of problem:

Something like a quarter of the PPDs invoke perl.  Almost all of these appear to be for stream editing to select paper size or tray, and can be trivially replaced with the equivalent sed invocation.  perl is something like 30M on disk, so this is non-trivial space for live media.

As an example, /usr/share/foomatic/db/source/PPD/Gestetner/PXL/Gestetner-Pro_906EX_PXL.ppd.gz contains:

*FoomaticRIPOptionSetting PageSize=A5: " -sPAPERSIZE=a5 -sOutputFile=- - | perl -p -e "s/\xf8\x28\xc0.\xf8\x25/\xf8\x28\xc0\x0f\xf8\x25/g""

The 'perl -p -e' here can be trivially replaced with 'sed'.

Comment 1 Matthias Clasen 2009-07-30 06:15:32 UTC
foomatic is now the last package that pulls perl onto the live cd. So getting this done would give us _big_ space savings.

Comment 2 Tim Waugh 2009-07-30 08:48:54 UTC
Examining this more closely I think it is a much bigger project than I first thought.  There are two types of PPD available from foomatic:

1. the 'manufacturer's own' PPD files, of which the one quoted is meant to be an example,
2. PPD files generated from the XML data

To actually get one of the generated PPD files you need to have invoked the foomatic CUPS driver (/usr/lib/cups/driver/foomatic, i.e. /usr/bin/foomatic-ppdfile), which is written in perl. (CUPS will do this for you as part of adding a printer.)

If you already had PPDs set up, everything you need is in C except for the filtration parts, which of course can be fixed but they are currently shipped in the same package, which will still require perl due to the foomatic CUPS driver.

So aside from re-implementing all of foomatic-db-engine in C there are two options to look at:

1. Splitting out the foomatic-db parts from the foomatic package, so the PPDs are available in a separate package which can go on the Live CD -- as in bug #461234.

2. Just not shipping foomatic on the Live CD and dropping the 'Requires: foomatic' line from system-config-printer.

The question is: is it too late for me to split foomatic into two separate source packages?

Comment 3 Matthias Clasen 2009-07-31 14:17:16 UTC
I've being doing several package splits over the last few days to help the live cd. So I think you are definitively not too late to do this.

Comment 4 Tim Waugh 2009-08-18 08:51:18 UTC
Done.


Note You need to log in before you can comment on or make changes to this bug.