On Mon, 2007-03-26 at 16:40 +0200, Klaus Singvogel wrote:
hal provides for a device the same information, which usb backend of CUPS uses: vendor, model, serial number.
A few execptions are done for some vendors: so "Hewlett-Packard" (regardless of lower-/uppercase writing) is always mapped to "HP". This was done to be compatible with PPD and ICC spec naming.
It should be easy with these information to do a mapping between hal device_id and the cups device_uri naming. A simple scan should be enough. :-)
After further investigation I don't think using the HAL backend buys us anything if we need to keep the usb backend around. It just creates more work mapping between the two uri schemes to resolve ambiguities without giving us any real benefit other than being cleaner. In an ideal world HAL would be used to detect hardware, but we can still leverage HAL callouts without using the HAL uri scheme.
We should not use the automatic setup solution from Fedora: - The origin of the database seems not to be public. We cannot react if we want to handle all of our supported printers just before a product realase. We are always one release cycle behind RedHat/Fedora if we want to use their solution. No improvements at our side.
I noted it could be a starting point, nothing more. How do we generate our database? No one in the previous dist meetings indicating we had a good mapping of printers to print drivers and noted that previous efforts to collect this data had failed.
YaST already uses one. :-)
Is /var/lib/YaST2/ppd_db.ycp the one you're referring to? How is this generated? Where do you get the mapping information from? Also, Fedora uses Foomatic, which is in no way private. Is there any reason why we don't ship and use Foomatic? There are tools other than Yast that need a printer to ppd/driver mapping. The parsing and fuzzy mapping of ppd files on the system is painful. It would be nice to have one solution used by all of our tools.
- The automatic setup didn't show any further development at Fedora/RedHat since quiet some time (it's outdated!). This was the main reason, why even Ubuntu/Debian went away and uses now printerdrake.
Printerdrake also uses automatic queue setup. See https://wiki.ubuntu.com/PrinterDrake.
- We already have a in-house solution, named YaST!!! Why cant we use that? YaST already does automatic printer installation, when doing a new system installation. It should be no major effort, to enhance YaST in such a way that we get an command-line interface to do this.
I'd be happy to chat with you about the requirements for this piece of the puzzle and how we can go about doing this.
There are more or less obvious interfaces for me in development: the call-backs of the hal system, the mapping of "hal device ids" <-> "cups usb device_uris", the selection of a printer driver and installation process (or the enhancement of YaST). But also the remove of a printer when unplugged happens, and the book-keeping for a change of state when a reboot happens.
We might not even need a mapping for the uris. We can simply use the callout as a "a new printer was added" event. We can then use the list of printers detected by the backends and compare them to the list cups knows about to figure out which printers need to be setup. Just a thought. Chris --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org