[Bug 944012] New: yast2-printer: /usr/lib/YaST2/bin/cups_client_only hangs about 30 seconds at "lpstat -h -p"
http://bugzilla.opensuse.org/show_bug.cgi?id=944012 Bug ID: 944012 Summary: yast2-printer: /usr/lib/YaST2/bin/cups_client_only hangs about 30 seconds at "lpstat -h -p" Classification: openSUSE Product: openSUSE Factory Version: 201505* Hardware: All OS: SUSE Other Status: NEW Severity: Minor Priority: P5 - None Component: YaST2 Assignee: yast2-maintainers@suse.de Reporter: jsmeix@suse.com QA Contact: jsrain@suse.com Found By: --- Blocker: --- when yast2-printer calls /usr/lib/YaST2/bin/cups_client_only without any parameter the script hangs for about 30 seconds at lpstat -h -p I noticed it with CUPS 2.1.0: ---------------------------------------------------------------------------- # time lpstat -h -p lpstat: No such file or directory real 0m35.051s user 0m0.004s sys 0m0.014s # time lpstat -p printer hl5150ljet4 is idle. enabled since Tue 01 Sep 2015 14:01:39 CEST real 0m0.017s user 0m0.008s sys 0m0.007s ---------------------------------------------------------------------------- The reason is in /usr/lib/YaST2/bin/cups_client_only that the line ---------------------------------------------------------------------------- if lpstat -h $SERVERNAME -p ---------------------------------------------------------------------------- is called with empty $SERVERNAME. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=944012 Johannes Meixner <jsmeix@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P4 - Low Found By|--- |Development Assignee|yast2-maintainers@suse.de |jsmeix@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=944012 http://bugzilla.opensuse.org/show_bug.cgi?id=944012#c1 Johannes Meixner <jsmeix@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CONFIRMED --- Comment #1 from Johannes Meixner <jsmeix@suse.com> --- It seems it happens only with CUPS 2.x With CUPS 1.7.5 on SLE12 there is no such delay: ----------------------------------------------------------------------------- # lpstat: Unable to connect to host. real 0m0.010s user 0m0.004s sys 0m0.000s ----------------------------------------------------------------------------- With CUPS 1.3.9 on SLE11 there is no such delay: ----------------------------------------------------------------------------- # time lpstat -h -p lpstat: Unable to connect to server real 0m0.010s user 0m0.004s sys 0m0.000s ----------------------------------------------------------------------------- -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=944012 http://bugzilla.opensuse.org/show_bug.cgi?id=944012#c2 --- Comment #2 from Johannes Meixner <jsmeix@suse.com> --- Fix (looks ugly here because long lines shown wrapped): ------------------------------------------------------------------------------- --- cups_client_only.orig 2015-09-01 14:22:28.462657999 +0200 +++ cups_client_only 2015-09-01 14:21:28.393707500 +0200 @@ -21,7 +21,7 @@ # there must be a "/version=1.1" suffix to enforce using IPP version 1.1 # because CUPS <= 1.5 servers reject higher IPP version requests with "Bad Request": if zypper versioncmp $( cups-config --version ) 1.6 | grep -q 'newer' -then if test "none" != "$SERVERNAME" -a "localhost" != "$SERVERNAME" -a "127.0.0.1" != "$SERVERNAME" +then if test "" != "$SERVERNAME" -a "none" != "$SERVERNAME" -a "localhost" != "$SERVERNAME" -a "127.0.0.1" != "$SERVERNAME" then # On a CUPS >= 1.6 system "lpstat -h cups_1.5_server -p" results on stderr: # lpstat: Error - add '/version=1.1' to server name. if lpstat -h $SERVERNAME -p 2>&1 1>/dev/null | grep -q "add '/version=1.1' to server name" ------------------------------------------------------------------------------- -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=944012 http://bugzilla.opensuse.org/show_bug.cgi?id=944012#c3 --- Comment #3 from Johannes Meixner <jsmeix@suse.com> --- Same kind of code is also in /usr/lib/YaST2/bin/modify_cupsd_conf (lpstat -h $VALUE -p) and in /usr/lib/YaST2/bin/test_remote_ipp (lpstat -h $SERVER -p) where it is o.k. because it is tested that $VALUE and $SERVER cannot be empty. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=944012 http://bugzilla.opensuse.org/show_bug.cgi?id=944012#c4 Johannes Meixner <jsmeix@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED Resolution|--- |WONTFIX --- Comment #4 from Johannes Meixner <jsmeix@suse.com> --- Since a long time I do no longer find time to work on yast2-printer, cf. https://lists.opensuse.org/yast-devel/2015-03/msg00044.html Accordingly I close it as WONTFIX which only means that I cannot fix it. This issue might be reopened by someone else who likes to adapt and enhance yast2-printer to what is needed by current CUPS and cups-filters. But there are no other issues (like user bug reports) in this area so that the current state could be even considered sufficient in practice. Accordingly it is questionable if further efforts should really be spend on yast2-printer. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=944012 Johannes Meixner <jsmeix@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |https://lists.opensuse.org/ | |yast-devel/2015-03/msg00044 | |.html -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com