FS#41866 - [foomatic-db-engine] Missing Dependencies for foomatic commands

Attached to Project: Arch Linux
Opened by Caddican (Caddican) - Monday, 08 September 2014, 00:34 GMT
Last edited by Andreas Radke (AndyRTR) - Monday, 29 December 2014, 15:50 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
I was just trying to install a printer using the driver ''Brother HL-2035 Foomatic/hl1250 (recommended)'' with cups, but it's driver was missing from the database.

After this I noticed three errors after executing ''foomatic-ppdfile -A'' (note some more foomatic commands did return errors too).
It seems to me that fomatic-db depends on ''perl-xml-libxml, perl-clone, perl-dbi''. All three of them fix my problem. And they are not listed in the dependencies.
Also note that the printer driver is found afterwards.

Additional info:
* package version(s)
* foomatic-db 3:20140720-1
* perl-xml-libxml 2.0116-2
* perl-clone 0.37-2
* perl-dbi 1.631-2
* perl 5.20.0-5

Steps to reproduce:
If you have installed ''perl-xml-libxml, perl-clone, perl-dbi'' remove them and foomatic should start to fail.
   log (2.3 KiB)
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Monday, 29 December 2014, 15:50 GMT
Reason for closing:  Implemented
Additional comments about closing:  perl deps added in ver. 20141229-1
Comment by Andreas Radke (AndyRTR) - Saturday, 11 October 2014, 17:56 GMT
foomatic-ppdfile is part of foomatic-db-engine. its README says this:

Dependencies
------------

Besides Perl and a C compiler with its standard libraries you will
need the libxml C library for XML handling and one of the tools
"wget"/"curl".

In addition, you need the Foomatic database ("foomatic-db") and the
Foomatic filters ("foomatic-filters") packages. It is recommended to
install these packages before you install this package. Then the paths
to their components get auto-detected during the build of this
package.

"wget" (from www.gnu.org) is really a standard tool which nearly every
distribution includes.

Because libxml is also used by GNOME, it is probably also part of
every distribution of GNU/Linux or *BSD and one can also easily build
it on any Unix-like operating system. If you distribution does not
provide libxml you can get libxml from

http://www.xmlsoft.org/

If your distribution contains libxml, note that besides the "libxml"
or "libxml2" package you must install also a package with a name
"libxml-devel" or "libxml2-devel" to be able to compile programs which
use libxml. This additional package contains the needed header files
and "xml(2)-config", which tells the C compiler where it finds the
header files. If "xml(2)-config" or some header files in the packages
of your distribution are missing, compile libxml from source.

The versions 1.8.17 and 2.4.19 of libxml are tested, both work, but
1.8.17 requires that the XML files do not have leading blank
lines. Use foomatic-fix-xml if you have such XML files (old or
third-party files).

Using libxml 2.x is highly recommended.

You need libxml 2.x, aclocal (in the "automake" package in some
distros), and autoconf when you want to compile Foomatic from the BZR
repository.

See the USAGE file for compilation details.



LANG=C pacman -Qi foomatic-db-engine | grep Depends
Depends On : perl libxml2 cups-filters>=1.0.42 bash

This should cover all that is recommended upstream.

Maybe you should ask Till Kampeter or other upstream devs if there's something wrong or missing.
These perl packages are not expected to be installed.

Such deps are also not included in Debian and Fedora foomatic packages.
Comment by Olivier (olive) - Friday, 07 November 2014, 09:00 GMT
I can confirm that without the additional suggested dependencies none of the executable in this package work. Just launch foomatic-ppdfile (for example) without any argument (which should just display a help message):

[oesser@pcolivier ~]$ foomatic-ppdfile
Can't locate XML/LibXML.pm in @INC [...]

The same error messages appears for every executable in this packages. So whatever it is said elsewhere or in other distributions, the mentioned perl modules seems to be dependencies. There is also a problem with /usr/lib/cups/driver/foomatic that hang (or take too much time) and make cups fail (both 1.7.x and 2.002 version) when we try to add a printer from the web interface with the following error message instead of the list of possible ppd file to choose:

Unable to get list of printer drivers:

Success

The problem appears only when the above mentioned perl modules are installed, otherwise /usr/lib/cups/driver/foomatic fails at once and the output of foomatic is not taken into consideration.
Comment by Thomas Weidner (thomas001le) - Monday, 01 December 2014, 13:11 GMT
I have also experienced this problem. Moreover cups integration is also broken without these perl packages, i.e., the list of available printer drivers misses the entries generated by foomatic.
Comment by Andreas Radke (AndyRTR) - Monday, 01 December 2014, 20:24 GMT
Again please bring this upstream how this could happen if this is a build doc issue or why this only breaks in Arch.
Comment by Olivier (olive) - Tuesday, 02 December 2014, 08:05 GMT
I remember that in Ubuntu, they provide all the generated ppd files (assumed by running foomatic-ppdfile with the good options, although I have not checked in detail and do not have Ubuntu installed right now). With the dependencies, generating the ppd files take a very long time and, although cups tries to generate them on the fly when we install a new printer, it times out and give an error (I assume that is the reason why Ubuntu pregenerate all the ppds).

Other distributions usually fixes such small issues themselves. Although I think that they often patch and modify upstream too much, small adjustments are sometimes required for the package to work. I do not think Arch should wait for upstream too fix small inaccuracies in their doc to provide a working package.

I have just checked how Fedora handles it: same as Ubuntu, they provides all the pregenerated ppd and the required "dependencies" are also installed on the system. The reason why this only break in Arch is now clear, can we have a fix?

Loading...