hp-check uses build time component (cups-config) during run-time check

Bug #565689 reported by Mark Purcell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
Fix Released
Undecided
Unassigned

Bug Description

hp-check is using a build time component (cups-config) to do its run
time dependency checking. That is the issue.

hp-check doesn't depend on cups-config, Without libcups2-dev it reports
incorrectly (run time -r):

$ hp-check -r
[...]

Checking for CUPS...
Status: scheduler is running
error: Version: (Not available. CUPS may not be installed or not running.)

[...]
Checking for dependency: CUPS - Common Unix Printing System...
OK, found.

As you can see from the results above, without libcups2-dev, hp-check does report
correctly that the scheduler is running, and that the runtime dependency for
CUPS is met. The thing it cannot determine without cups-config is what version
of CUPS we are running.

> WDYT what should we do?

Replace the runtime call on cups-config with something that will give the
version of the installed CUPS.

Unfortunately none of the binaries shipped with cups appear to report their
version:

cups:
/usr/sbin/cupsd
/usr/sbin/cupsfilter

cups-client:
/usr/sbin/lpadmin
/usr/sbin/cupsaddsmb
/usr/sbin/lpinfo
/usr/sbin/lpmove
/usr/sbin/cupsctl
/usr/sbin/cupsaccept
/usr/bin/cancel
/usr/bin/lpstat
/usr/bin/lppasswd
/usr/bin/cupstestdsc
/usr/bin/lpoptions
/usr/bin/cupstestppd
/usr/bin/lp
/usr/sbin/reject
/usr/sbin/accept
/usr/sbin/cupsreject
/usr/sbin/cupsenable
/usr/sbin/cupsdisable

I would suggest with discuss with CUPS and get an Version string printed out,
possible against; lpinfo and/or cupsd -t.

http://www.cups.org/str.php?L2930

Mark

Mark Purcell (msp)
description: updated
Revision history for this message
Mark Purcell (msp) wrote :

In the meantime we should downgrade the runtime check from an error to a warning.

--- /usr/bin/hp-check 2010-04-13 06:57:57.000000000 +1000
+++ /usr/local/bin/hp-check 2010-04-18 10:47:46.000000000 +1000
@@ -339,9 +339,7 @@
         if status == 0:
             log.info("Version: %s" % output.strip())
         else:
- log.error("Version: (Not available. CUPS may not be installed or not running.)")
- cups_ok = False
- num_errors += 1
+ log.warn("Version: (Not available (cups-config). Unable to determine installed version of CUPS.)")

     if cups_ok:
         cups_conf = '/etc/cups/cupsd.conf'

Revision history for this message
Naga Samrat Chowdary, Narla (samrat-hplip) wrote :

Hi Mark Purcell,
You are correct. I will apply the patch.

Thanks!
Naga Samrat Chowdary, Narla

Changed in hplip:
status: New → Confirmed
Changed in hplip:
status: Confirmed → Fix Committed
Changed in hplip:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.