Author: jsmeix
Date: Fri Aug 7 14:51:57 2009
New Revision: 58299
URL: http://svn.opensuse.org/viewcvs/yast?rev=58299&view=rev
Log:
Improved Printerlib::WaitForUpdatedConfigFiles
In openSUSE 11.2 there will be most likely still CUPS 1.3.x
where the above 30 seconds fallback would result needless waiting.
To avoid needless waiting there is a fail-safe test if CUPS 1.3.x
is used and if yes, the matching 0 seconds waiting time is used.
Modified:
trunk/printer/src/Printerlib.ycp
trunk/printer/tools/autodetect_print_queues
trunk/printer/tools/autodetect_printers
trunk/printer/tools/create_printer_ppd_database
trunk/printer/tools/cups_client_only
trunk/printer/tools/determine_printer_driver_options
trunk/printer/tools/modify_cupsd_conf
trunk/printer/tools/test_remote_ipp
trunk/printer/tools/test_remote_lpd
trunk/printer/tools/test_remote_novell
trunk/printer/tools/test_remote_smb
trunk/printer/tools/test_remote_socket
Modified: trunk/printer/src/Printerlib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/Printerlib.ycp?rev=58299&r1=58298&r2=58299&view=diff
==============================================================================
--- trunk/printer/src/Printerlib.ycp (original)
+++ trunk/printer/src/Printerlib.ycp Fri Aug 7 14:51:57 2009
@@ -525,6 +525,14 @@
// and then the default delay until cupsd writes config files like printers.conf
// is 30 seconds which is also used here as fallback.
integer dirty_clean_interval = 30;
+ // In openSUSE 11.2 there will be most likely still CUPS 1.3.x
+ // where the above 30 seconds fallback would result needless waiting.
+ // To avoid needless waiting there is a fail-safe test if CUPS 1.3.x is used
+ // and if yes, the matching 0 seconds value is used.
+ // Note the YCP quoting: \\. becomes \. in the commandline.
+ if( ExecuteBashCommand( "cups-config --version | grep -q '^1\\.3'" ) )
+ { dirty_clean_interval = 0;
+ }
// Determine the DirtyCleanInterval value in /etc/cups/cupsd.conf:
if( ExecuteBashCommand( yast_bin_dir + "modify_cupsd_conf DirtyCleanInterval" ) )
{ // I must use "0123456789" here instead of Printer::number_chars because
@@ -536,8 +544,9 @@
)
{ dirty_clean_interval = tointeger( dirty_clean_interval_string );
}
- // Use fallback value when there is no DirtyCleanInterval entry or
- // when the DirtyCleanInterval value cannot be converted to an integer.
+ // Use the above defined fallback value 30 or the CUPS 1.3.x value 0
+ // when there is no DirtyCleanInterval entry (this applies also for CUPS 1.3.x)
+ // or when the DirtyCleanInterval value cannot be converted to an integer.
}
// Use fallback cupsd_conf_dirty_clean_interval value when the command above failed.
y2milestone( "Waiting DirtyCleanInterval='%1'+1 seconds for updated config files.", dirty_clean_interval );
Modified: trunk/printer/tools/autodetect_print_queues
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/autodetect_print_queues?rev=58299&r1=58298&r2=58299&view=diff
==============================================================================
--- trunk/printer/tools/autodetect_print_queues (original)
+++ trunk/printer/tools/autodetect_print_queues Fri Aug 7 14:51:57 2009
@@ -1,6 +1,6 @@
#! /bin/bash
#
-# Johannes Meixner , 2007, 2008
+# Johannes Meixner , 2007, 2008, 2009
#set -x
Modified: trunk/printer/tools/autodetect_printers
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/autodetect_printers?rev=58299&r1=58298&r2=58299&view=diff
==============================================================================
--- trunk/printer/tools/autodetect_printers (original)
+++ trunk/printer/tools/autodetect_printers Fri Aug 7 14:51:57 2009
@@ -1,6 +1,6 @@
#! /bin/bash
#
-# Johannes Meixner , 2007, 2008
+# Johannes Meixner , 2007, 2008, 2009
#set -x
Modified: trunk/printer/tools/create_printer_ppd_database
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/create_printer_ppd_database?rev=58299&r1=58298&r2=58299&view=diff
==============================================================================
--- trunk/printer/tools/create_printer_ppd_database (original)
+++ trunk/printer/tools/create_printer_ppd_database Fri Aug 7 14:51:57 2009
@@ -1,6 +1,6 @@
#! /bin/bash
#
-# Johannes Meixner , 2007, 2008
+# Johannes Meixner , 2007, 2008, 2009
#set -x
Modified: trunk/printer/tools/cups_client_only
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/cups_client_only?rev=58299&r1=58298&r2=58299&view=diff
==============================================================================
--- trunk/printer/tools/cups_client_only (original)
+++ trunk/printer/tools/cups_client_only Fri Aug 7 14:51:57 2009
@@ -1,6 +1,6 @@
#! /bin/bash
#
-# Johannes Meixner , 2007, 2008
+# Johannes Meixner , 2007, 2008, 2009
#set -x
Modified: trunk/printer/tools/determine_printer_driver_options
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/determine_printer_driver_options?rev=58299&r1=58298&r2=58299&view=diff
==============================================================================
--- trunk/printer/tools/determine_printer_driver_options (original)
+++ trunk/printer/tools/determine_printer_driver_options Fri Aug 7 14:51:57 2009
@@ -1,6 +1,6 @@
#! /bin/bash
#
-# Johannes Meixner , 2007, 2008
+# Johannes Meixner , 2007, 2008, 2009
#set -x
Modified: trunk/printer/tools/modify_cupsd_conf
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/modify_cupsd_conf?rev=58299&r1=58298&r2=58299&view=diff
==============================================================================
--- trunk/printer/tools/modify_cupsd_conf (original)
+++ trunk/printer/tools/modify_cupsd_conf Fri Aug 7 14:51:57 2009
@@ -1,6 +1,6 @@
#! /bin/bash
#
-# Johannes Meixner , 2007, 2008
+# Johannes Meixner , 2007, 2008, 2009
#set -x
Modified: trunk/printer/tools/test_remote_ipp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/test_remote_ipp?rev=58299&r1=58298&r2=58299&view=diff
==============================================================================
--- trunk/printer/tools/test_remote_ipp (original)
+++ trunk/printer/tools/test_remote_ipp Fri Aug 7 14:51:57 2009
@@ -13,7 +13,7 @@
# 15 lp not executable (no cups-client RPM installed?)
# The program head is in the coreutils RPM and therefore assumed to exist.
#
-# Johannes Meixner , 2000, 2002, 2007, 2008
+# Johannes Meixner , 2000, 2002, 2007, 2008, 2009
# Jan Holesovsky , 2000
# Jiri Srain , 2002
# $Id: test_remote_ipp 43943 2008-01-28 13:38:58Z mzugec $
Modified: trunk/printer/tools/test_remote_lpd
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/test_remote_lpd?rev=58299&r1=58298&r2=58299&view=diff
==============================================================================
--- trunk/printer/tools/test_remote_lpd (original)
+++ trunk/printer/tools/test_remote_lpd Fri Aug 7 14:51:57 2009
@@ -16,7 +16,7 @@
# 13 mktemp not executable (no mktemp RPM installed?)
# The programs head, mkfifo, sleep, tr, rm are in the coreutils RPM and therefore assumed to exist.
#
-# Johannes Meixner , 2000, 2002, 2007, 2008
+# Johannes Meixner , 2000, 2002, 2007, 2008, 2009
# Jan Holesovsky , 2000
# Jiri Srain , 2002
# $Id: test_remote_lpd 43943 2008-01-28 13:38:58Z mzugec $
Modified: trunk/printer/tools/test_remote_novell
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/test_remote_novell?rev=58299&r1=58298&r2=58299&view=diff
==============================================================================
--- trunk/printer/tools/test_remote_novell (original)
+++ trunk/printer/tools/test_remote_novell Fri Aug 7 14:51:57 2009
@@ -8,7 +8,7 @@
# (10=ping,11=netcat,12=fuser,13=mktemp,14=sed,15=lp,16=smbclient: see test_remote_smb)
# 17 nprint not executable (no ncpfs RPM installed?)
#
-# Johannes Meixner , 2000, 2002, 2007, 2008
+# Johannes Meixner , 2000, 2002, 2007, 2008, 2009
# Jan Holesovsky , 2000
# Jiri Srain , 2002
# $Id: test_remote_novell 43943 2008-01-28 13:38:58Z mzugec $
Modified: trunk/printer/tools/test_remote_smb
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/test_remote_smb?rev=58299&r1=58298&r2=58299&view=diff
==============================================================================
--- trunk/printer/tools/test_remote_smb (original)
+++ trunk/printer/tools/test_remote_smb Fri Aug 7 14:51:57 2009
@@ -11,7 +11,7 @@
# 16 smbclient not executable (no samba-client RPM installed?)
# The programs head, mkfifo, sleep, tr, rm are in the coreutils RPM and therefore assumed to exist.
#
-# Johannes Meixner , 2000, 2002, 2007, 2008
+# Johannes Meixner , 2000, 2002, 2007, 2008, 2009
# Jan Holesovsky , 2000
# Jiri Srain , 2002
# $Id: test_remote_smb 43943 2008-01-28 13:38:58Z mzugec $
Modified: trunk/printer/tools/test_remote_socket
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/test_remote_socket?rev=58299&r1=58298&r2=58299&view=diff
==============================================================================
--- trunk/printer/tools/test_remote_socket (original)
+++ trunk/printer/tools/test_remote_socket Fri Aug 7 14:51:57 2009
@@ -11,7 +11,7 @@
# 11 netcat not executable (no netcat RPM installed?)
# The program head is in the coreutils RPM and therefore assumed to exist.
#
-# Johannes Meixner 2002, 2007, 2008
+# Johannes Meixner 2002, 2007, 2008, 2009
# Jiri Srain , 2002
# $Id: test_remote_socket 43943 2008-01-28 13:38:58Z mzugec $
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org