system-config-printer could use PackageKit to request installation of new PPDs. PPDs could advertise which printers they support through the RPM provides, similarly to what gstreamer plugins, and .desktop files would (see bug 438225).
Problem is that a typical distribution contains more or less as many PPD files (both physically present and available via PPD generator in /usr/lib/cups/driver/) as it contains packages. So if all packages which contain or generate PPDs have the device ID of each printer which they support in their RPM provides, there would be more or less one half of the output lines of "rpm -qa" entries for printers. In general it would be nice if printer drivers can be installed with something like (simplified) yum install `usb_printerid /dev/usb/lp0` but package list would get cluttered a lot.
Interesting idea. Not entirely sure how it would work for printer drivers; perhaps something like this: Provides: PPD(MFG:EPSON;MDL:EPSON Stylus CX3100;) Till: actually these 'provides' tags are not treated as packages for the purposes of 'rpm -qa' or the like. For instance, in Fedora 9 the xulrunner package provides 'gecko-libs', but this is not listed in the 'rpm -qa' output. Similarly for the implicit library dependencies such as 'libz.so.1()(64bit)'.
(In reply to comment #1) > Problem is that a typical distribution contains more or less as many PPD files > (both physically present and available via PPD generator in > /usr/lib/cups/driver/) as it contains packages. So if all packages which contain > or generate PPDs have the device ID of each printer which they support in their > RPM provides, there would be more or less one half of the output lines of "rpm > -qa" entries for printers. Huh? Who's talking about splitting each PPD file into a separate package? I'm talking about using the RPM provides to advertise which PPD files the package contains. "rpm -q --provides package-name" would list > In general it would be nice if printer drivers can be installed with something > like (simplified) > > yum install `usb_printerid /dev/usb/lp0` > > but package list would get cluttered a lot. Except that yum would look in both the package names, and the provides that those packages have. Just like a single library package can provide more than one library provides (see output of "rpm -q --provides glibc". So the above would actually be possible without cluttering the package list. (In reply to comment #2) > Interesting idea. Not entirely sure how it would work for printer drivers; > perhaps something like this: > > Provides: PPD(MFG:EPSON;MDL:EPSON Stylus CX3100;) You'd need a bit of code to marshal and de-marshal the IEEE1284 ID for the printer/PPD names.
(In reply to comment #3) > > Provides: PPD(MFG:EPSON;MDL:EPSON Stylus CX3100;) > > You'd need a bit of code to marshal and de-marshal the IEEE1284 ID for the > printer/PPD names. Yes, this isn't particularly hard. PPD files should have '*1284DeviceID' attributes containing this information, and if they don't we just don't add a 'provides' symbol for that PPD. More tricky would be having a generic script for RPM to determine which PPDs are shipped in a package. It isn't just a case of looking for *.ppd files, as in many cases the PPSs are generated from CUPS drivers; however, they *are* easy to spot, and have a known API. Would be time-consuming at package build time to generate each PPD and look for IEEE 1284 ID strings, but this would *really* pay off if we could demand-install drivers based on those ID strings.
There will need to be a different D-Bus API between hal-cups-utils and system-config-printer-applet, as hal-cups-utils will now have to ask for packages to be installed before it can look for PPDs. Interestingly, someone from Mandriva sent me a patch to add a similar interface for installing the cups package at that stage, which is along similar lines.
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle. Changing version to '10'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Fixing version to align with rawhide again. Sorry for the noise.
(In reply to comment #5) > There will need to be a different D-Bus API between hal-cups-utils and > system-config-printer-applet, as hal-cups-utils will now have to ask for > packages to be installed before it can look for PPDs. What packages would you need to install before you install the necessary PPDs? Is this for printers that need additional packages to be accessed _before_ we can get their advertise IEEE1284 ID? > Interestingly, someone from Mandriva sent me a patch to add a similar interface > for installing the cups package at that stage, which is along similar lines. CUPS itself? I thought that was a hard-dependency for the desktop nowadays.
*** Bug 497440 has been marked as a duplicate of this bug. ***
This is a bit harder than first thought: 1. foomatic is just a nightmare. It doesn't depend on all the tiny little drivers and scripts it knows about, so it doesn't really help to add tags to it anyway. Best to ignore it I think, and concentrate on the CUPS native drivers. 2. Some drivers are now shipped in the form of cupsddk-based 'drv' files and we don't have a good way to fetch PPDs from those without cupsd running.
Some progress made. I've created an RPM provides script that can extract makes and model names from the three available CUPS driver types: i. Plain PPD files ii. Dynamic drivers (/usr/lib/cups/driver/*) iii. DDK drivers (/usr/share/cups/drv/*.drv) It is checked into the system-config-printer git repository as postscriptdriver.prov. Provides tags are generated in the format "postscriptdriver($MFG;$MDL;)", where $MFG and $MDL are the manufacturer and model names of the supported device, with some processing performed on them: * they are converted to lower case * parentheses "()" and spaces " " are translated to underscores "_"
Created attachment 358575 [details] postscriptdriver.prov RPM provides script.
Created attachment 358576 [details] rpm-postscriptdriver.patch Patch for rpm-4.7.1 to get it to use it in the internal dependency generator.
Requires feature page.
https://fedoraproject.org/wiki/Features/AutomaticPrintDriverInstallation
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle. Changing version to '12'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Created attachment 373158 [details] postscriptdriver.prov New version of postscriptdriver.prov which doesn't replacement spaces or parentheses.